Started by 2 years ago4 replieslatest reply 2 years ago1000 views

hi all !

I am doing a BER (BIT ERROR RATE) in vhdl and I have to put 2 registers clear on read which counts the number of words in error and the number of bits in error. i want to know what is a register clear on raed and how i can code a register clear on read in vhdl?

thank you,

[ - ]

Clear on read means that when the host processor reads the data from your peripheral, the registers should reset themselves to zero.

Within your bus interface block you will have some logic which multiplexes the registers out to the databus when a read happens, based on the incoiming address.  The logic that manages that can be used to create a single-cycle signal, one for each register, which you can use as a synchronous reset on the registers in question.  If you already have a sync reset you can 'or' this new signal in (assuming active high reset):

process (clk)
begin
if rising_edge(clk) then
reg_value <= (others => '0');
else
etc...
[ - ]