The S1 <= wave1 to Sn <= wave_n flipflops shown realize all the sequential signal assignment actions that lie in the VHDL text between the WAIT statement for "current" and the "next" WAIT statement. Note that the new value for all of the signals will not be driven until the "next" state. This corresponds to the VHDL process entering the next WAIT statement.
-- This process involves interfaces to the following other parts of the system -- CPU -- cpureq (may be READ or WRITE) -- cpu_address -- cpu_data for WRITE, and returns data to cpu_data on READ -- Bus Manager -- may not use the bus until a busreq has been sent and acknowledged -- with a bus_grant -- Memory -- activated with memreq, and responds with a ssyn signal when data is valid -- on a READ (nWR = '1'), or when data has been accepted on WRITE -- process -- Handshaking for block read or block write nWR <= '0'; -- initial conditions memreq <= '0'; busreq <= '0'; msync <= '0'; bus_adrs <= (others=>'Z'); bus_data <= (others=>'Z'); cpu_data <= (others=>'Z'); if (cpureq /= '1') then WAIT UNTIL (cpureq = '1'); busreq <= '1'; -- request bus control for block transfer -- when granted, assert bus master to preclude any other transfer occuring WAIT UNTIL bus_grant = '1'; while cpureq = '1' loop -- Assume CPU does not send cpu_valid until msync='0' if cpu_valid = '0' then WAIT UNTIL cpu_val = '1'; nWR <= not cpu_write; -- set latches -- supply memreq, nWR = '1' -- then send msyn after deskewing address memreq <= '1'; msync <= '1' after Tdeskew; -- issue memory request bus_adrs <= cpu_adrs; if cpu_write = '1' then bus_data <= cpu_data; else cpu_data <= bus_data; end if; WAIT UNTIL ssyn = '1'; -- when ssyn is returned bus_adrs <= (others=>'Z'); msync <= '0' after Tskew; end loop; end process;
Example: For the circuit above, the AND gate that sets S2 flipflop associated with WAIT until ssyn also sets
the nWR latch, sets the memreq latch, clocks cpu_adrs to drive bus_adrs, and clocks in
the data between the cpu and bus in the direction specified by the cpu_write signal.
Notice the busreq latch. Because it is reset by the same signal that setsS0 and set by S1 at the same
time S0 is reset, it is redundant. Busreq = not S0. The same is true for the msync latch and S3, so it can be optimized out of the circuit, too.
For example, the while loop produces the path through AND gate w1 that continues
the two step block transfer.
Rev. 10/13/95 B. Huey
Basic asynchronous step
Copyright 1995, Ben M. Huey
Copying this document without the permission of the author is prohibited
and a violation of international copyright laws.