Forum: FPGA, VHDL & Verilog One bit for status

Author: Raju (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi All,

I have 4 registers (for Address, Data_to_be_read, Data_to_be_written & 
Control) in a serial RX block.

This will be accessed by another Serial Tx Master device, it accesses 
the address register, if control is read=1, goes to that address and 
read the data from that address and copies it to Data_to_be_read 

If the control is write=1, it reads the address from Address register, 
copies data from Data_to_be_written register and writes it on to the 
address location.

Now my problem is if i use 1 bit for control register '1' for read and 
'0' for write, it may start reading at correct times, but keeps on 
writing all the time when the bit is '0' . (end of reading not 
necessarily mean writing)

(however if i use two separate 1 bit lines for read and write, i can use 
pulse in those leans to decode when to start reading and when to start 

Is it possible to use 1 bit for control and still start the reading 
operation and writing operation.

Thank you,

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
See it that way: you can read every address randomly at every time. 
But you only should write stable data to a valid address. So the 
default of that flag must be: Read.

One problem may occur, when you try to read registers that implicitly 
write something. For example when you read a interrupt register, and 
that read itself resets the interrupt request (as it is in some uC).


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.