Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

FPGA Beginner Question

Hi all,

I want to deploy an error correction code on the FPGA, and I have to do a simple trick to set the parity equal to 1 in the beginning.

Original code:

assign nxt_parity=cur_parity;

Can I do this?

parameter ECC_ONE = 1;
assign nxt_parity=cur_parity || ECC_ONE;

Thanks!

Elena

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    This will just assign the next parity to be always 1. I dint think you want to do that. You need to use an initial block on your registers