Forum: FPGA, VHDL & Verilog for loop generate find a good syntax.

von Olivier D. (olivier_d)

Rate this post
0 useful
not useful
Hi all,

I vould like to find a good syntaxe for this action :

PeekDat <= X"0000000" & "000" & Data.InitDone   when PpAdd = X"05" else
   Timer         when PpAdd = X"08" else
   MiscReg1      when PpAdd = X"26" else
   MiscReg2      when PpAdd = X"27" else
   CsteVersion          when PpAdd = X"10" else
    for I in 1 to NB_MSGRX loop
      CntRxA.CntComOk(I)  when PpAdd = (X"10" + I) else
      CntRxA.CntComKo(I)  when PpAdd = (X"1A" + I) else
      CntRxB.CntComOk(I)  when PpAdd = (X"4A" + I) else
      CntRxB.CntComKo(I)  when PpAdd = (X"50" + I) else
      end loop;
      else     X"00000000";

I don't know if it's possible to add for I .. generte inside this code.
Maybye there are an others syntax

Thank you for your help

Olivier .


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
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.