Forum Discussion
Altera_Forum
Honored Contributor
8 years agoThe programmer fails or do you mean the compiler fails when compiling the design?
Is there a reason why you need to use integer (a signed 32-bit variable data type)? reg is more efficient because it only uses as many bits as needed, assuming you specify bit widths (8'h1 for 0x01 for example). You should be initializing these values in the always block with some type of reset signal (instead of initializing them up top) and using non-blocking assignments (<=) instead of blocking assignments (=) if your intent to create clocked registers, which is what this looks like. And is "randonValue" intentional or is that a typo (randomValue)?