Relative Content

Tag Archive for veriloghdl

Two modules exchange 4-bit data each time on the rising edge of the clock pulses. How to correctly write relationships between modules?

In the ModelSim workspace there are two separate modules A and B with identical clock inputs. The number 4’b0101 is written in the register of the first module at time zero, and 4’b1110 in the register of the second. Each time the clock edge rises, the registers exchange numbers. So, as a result, 4’b1110 is written to the first register, and 4’b0101 to the second. Etc. Tell me how please, how, in this case, to write the relationships between these submodules ports in a higher-level module?

Parallel shift of 4-bits by 1 clock cycle, simulation of delay on Verilog

I want to implement the following timing diagram (the numbers here are arbitrary, the main thing is the general principle). In my task a sequence of 4-bit data. This sequence must be written to registers A, B and C and shifted in each corresponding register by 1 clock cycle relative to the previous one.