sonika111
Member level 2
Hi all
I am trying to convert a big VHDL process block in a testbench into Verilog equivalent . It is not sensitive to anything but the statements occur in a sequence. There are some fileio operations and depending on the field the signals are assigned.....
I am struggling to decide if I can incorporate all this in inital block or I need to use always block. Also how to use the differnt fields of the line and direct the assignments accordingly(say each line that is read from .txt file has 4 fields, hex,hex.hex,string)
I would appreciate if any one can help me solve this problem??(by giving some code snippet please?) Many thanks
- - - Updated - - -
Another qusetion please if I decide to use initail block and I need to wait for example for posedge of clk or posedge of any_signal
is this valid
initial begin @posedge(clk);// or any signal...
Please advise(if it is not correct)what I need to do??
I think I would not prefer a always block as everything does not wait for posedge clk;
what is theway to deal with this?
- - - Updated - - -
Also please function in verilog to convert hex value into integer
- - - Updated - - -
This is equivalent to (count /= to_integer(unsigned(hex_value)))
- - - Updated - - -
(count /= to_integer(unsigned(hex_value)))
I am trying to convert a big VHDL process block in a testbench into Verilog equivalent . It is not sensitive to anything but the statements occur in a sequence. There are some fileio operations and depending on the field the signals are assigned.....
I am struggling to decide if I can incorporate all this in inital block or I need to use always block. Also how to use the differnt fields of the line and direct the assignments accordingly(say each line that is read from .txt file has 4 fields, hex,hex.hex,string)
I would appreciate if any one can help me solve this problem??(by giving some code snippet please?) Many thanks
- - - Updated - - -
Another qusetion please if I decide to use initail block and I need to wait for example for posedge of clk or posedge of any_signal
is this valid
initial begin @posedge(clk);// or any signal...
Please advise(if it is not correct)what I need to do??
I think I would not prefer a always block as everything does not wait for posedge clk;
what is theway to deal with this?
- - - Updated - - -
Also please function in verilog to convert hex value into integer
- - - Updated - - -
This is equivalent to (count /= to_integer(unsigned(hex_value)))
- - - Updated - - -
(count /= to_integer(unsigned(hex_value)))