Git Product home page Git Product logo

es203-coa-cnn's Introduction

ES-203 Computer Oraganization & Architecture CNN on FPGA board

Overview

Video Demostration

Vivado files

Tips for LUT Optimization

Here, I am mentionaing some methods for converting your C type for-loops into efficient always blocks with chaining one to another

1: How to convert a for loop into verilog always block

// C code
for(int i = 0; i<n; i++)
{
	operations and functions
}

Same process implemented using always a block & a flag

integer i = 0, flag = 0;
...code
{ flag = 1; }	// when required
always@(posedge clock)
if(flag)
begin
		if(i==n) flag = 0;
		else
	begin
		operations and functions
		i = i+1;
	end
end

2: How to convert Nested for-looping into verilog always block

// C code
for(int i = 0; i<m; i++)
{
		for(int j = 0; j<n; j++)
		{
			operations and functions;
		}
}

Same process implemented using always a block & a flag

integer i, j, flag;
{ flag = 1; }	// when required
always@(posedge clock)
if(flag)
begin
 if(i == 0 && j == 0)
	begin
 	Outer Loop initialization statements
		operations and functions;
	end
	else if( i == m )
	begin
		flag = 0;	// process completed
	end
	else if( j == n )
	begin 
		j = 0;	// intitialization statements analogous to inner for-loop 
		i = i+1; // updation statement of outer for loop
		operations and functions;
	end
	else
	begin
		operations and functions;
		j = j+1;
	end
end

Outputs on FPGA board

Presentation poster

Contributors

anupam
Lovepreet Singh
anupam
Anupam Kumar
img
Jayesh Salunkhe
img
Unnat Dave
img
Bhavesh Solanki

es203-coa-cnn's People

Contributors

anupam-io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.