EmbDev.net

Forum: FPGA, VHDL & Verilog Basic Question


von Elena C. (Company: TU Darmstadt) (elena_coso)


Rate this post
useful
not useful
Hi all,

I am newly working with Cosmos OpenSSD, a real SSD Board that deploys 
the flash Storage Controller and the Error Correction Code on FPGA. The 
Software is C++, yet the firmware is VERILOG. It is my first time 
working with Verilog and for now I only want a small trick in order to 
test a hypothesis.

My question is:

Let's say I have
1
assign nxt_parity[i] = cur_parity[i-1];

I want nxt_parity vector to have only 1s, independent of cur_parity. Can 
I do this trick in the assign?
1
parameter PARITY_ONE = 1;
2
assign nxt_parity[i] = ((cur_parity[i-1])||(PARITY_ONE));

Thank you very much for any hint you may provide!

best,
Elena

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Elena C. wrote:
> I want nxt_parity vector to have only 1s, independent of cur_parity.
So why do you need cur_parity at all?

von Elena C. (Company: TU Darmstadt) (elena_coso)


Rate this post
useful
not useful
Hi,

because we will do some time measurement ans simulate the real encoding 
process.

So my concern is: can I do this in the assign statement?

thanks!
Elena

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.