EmbDev.net

Forum: FPGA, VHDL & Verilog Can anyone help me to solve this verilog(beginner) question or suggest me any source for solving


von Omar K. (Company: Middle East University) (omar17)


Rate this post
0 useful
not useful
** Write the MCU super-loop version (state-machine with fixed heartbeat) 
of the following code:
while(1) {
   wt(2);
   AA();
   wt(6);
   BB();
   wt(4);
   CC();
}

**Then, Consider above question. Replace:

AA() with aa = bb + cc;
BB() with bb = aa * cc;
CC() with cc = bb - aa;

and write the corresponding Verilog RTL.

: Edited by Moderator
von Lothar M. (lkmiller) (Moderator)


Rate this post
1 useful
not useful
Omar K. wrote:
> wt(2);
What means that? Is it a delay like "wait for 2 clocks"?

> and write the corresponding Verilog RTL.
As a VHDL guy I would search the internet how a FSM is coded in Verilog. 
The search would not last long as this is a very basic thing. Then one 
counter for the delay. Thats all folks.


So start with something, then ask a particular question when you 
encounter specific problems. But it won't work here to wait for someone 
doing your homework.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig