Driving 1 bit off 2 clocks

Discussion in 'VHDL' started by snooks, Mar 24, 2008.

  1. snooks

    snooks

    Joined:
    Mar 24, 2008
    Messages:
    2
    Likes Received:
    0
    I am working on implementing the MC6850 ACIA for academic purposes. The implementation requires that when data is written to the data register, the empty flag is set to zero and when the data is read from the register, it is set to 1 (to indicate empty).

    The reading and writing are 2 different processes and I am not allowed to modify this same empty bit by 2 different processes. I am not sure how exactly to set this bit properly. Would somebody here be able to provide any advice? I'd really appreciate it.

    Thank you,

    Snooks
     
    snooks, Mar 24, 2008
    #1
    1. Advertisements

  2. snooks

    jeppe

    Joined:
    Mar 10, 2008
    Messages:
    348
    Likes Received:
    0
    Location:
    Denmark
    Indeed - your not allowed to modify the same bit from two or more processes.

    Your solution should be based on one process which uses asynchronous clear to modifify the bit (0 or 1) and clockes the oppersite value on eighter rising or falling edge.

    Its your own chooise how this should be done.

    An alternative solution could be to let the E-Clock (your system clock) trigger the F/F and then decide which value should be transfered (or the value should be kept)

    Hope you got the meaning of this.

    Your welcome
    Jeppe
     
    jeppe, Mar 24, 2008
    #2
    1. Advertisements

  3. snooks

    snooks

    Joined:
    Mar 24, 2008
    Messages:
    2
    Likes Received:
    0
    Thanks again for your reply. I think I'll use the first approach you suggested and put everything into 1 process. I'll post here if I succeed :).

    Thanks again,
    Sihanook
     
    snooks, Mar 24, 2008
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Spur

    sync on multiple clocks

    Spur, Aug 6, 2003, in forum: VHDL
    Replies:
    2
    Views:
    4,594
    Mike Treseler
    Aug 6, 2003
  2. john
    Replies:
    1
    Views:
    854
    Kai Harrekilde-Petersen
    Aug 28, 2003
  3. Divyang M
    Replies:
    4
    Views:
    1,340
    Divyang M
    Feb 17, 2005
  4. Metin Yerlikaya

    an alternative method to do divided clocks

    Metin Yerlikaya, Feb 15, 2005, in forum: VHDL
    Replies:
    4
    Views:
    861
    John_H
    Feb 15, 2005
  5. Ishira
    Replies:
    4
    Views:
    473
    Kevin Goodsell
    Aug 1, 2003
  6. markryde@gmail.com
    Replies:
    3
    Views:
    2,287
    Timothy Bendfelt
    Jan 19, 2007
  7. benn686@hotmail.com
    Replies:
    9
    Views:
    1,401
    Juha Nieminen
    Aug 22, 2007
  8. Jeff.M
    Replies:
    6
    Views:
    419
    Lasse Reichstein Nielsen
    May 4, 2009
Loading...