diff options
author | Matt Ettus <matt@ettus.com> | 2010-09-24 14:37:15 -0700 |
---|---|---|
committer | Matt Ettus <matt@ettus.com> | 2010-09-24 14:37:15 -0700 |
commit | 1f77494788fa4fa8450aaf170055553bd0e5fe8e (patch) | |
tree | 8e4f97f220cc99ef367122620c715536bc2247d7 /usrp2/gpmc | |
parent | 69992b4133145cd92629a0d15354b5d33f0c4973 (diff) | |
download | uhd-1f77494788fa4fa8450aaf170055553bd0e5fe8e.tar.gz uhd-1f77494788fa4fa8450aaf170055553bd0e5fe8e.tar.bz2 uhd-1f77494788fa4fa8450aaf170055553bd0e5fe8e.zip |
allow for CS to rise before, at the same time, or after OE
Diffstat (limited to 'usrp2/gpmc')
-rw-r--r-- | usrp2/gpmc/fifo_to_gpmc_async.v | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usrp2/gpmc/fifo_to_gpmc_async.v b/usrp2/gpmc/fifo_to_gpmc_async.v index 5ac8b19bd..cf8b6e861 100644 --- a/usrp2/gpmc/fifo_to_gpmc_async.v +++ b/usrp2/gpmc/fifo_to_gpmc_async.v @@ -11,23 +11,22 @@ module fifo_to_gpmc_async input [15:0] frame_len); // Synchronize the async control signals - reg [1:0] cs_del, oe_del; + reg [2:0] cs_del, oe_del; reg [15:0] counter; always @(posedge clk) if(reset) begin - cs_del <= 2'b11; - oe_del <= 2'b11; + cs_del <= 3'b11; + oe_del <= 3'b11; end else begin - cs_del <= { cs_del[0], EM_NCS }; - oe_del <= { oe_del[0], EM_NOE }; + cs_del <= { cs_del[1:0], EM_NCS }; + oe_del <= { oe_del[1:0], EM_NOE }; end - //wire do_read = (~cs_del[0] & (oe_del == 2'b10)); - wire do_read = (~cs_del[1] & (oe_del == 2'b01)); // change output on trailing edge + wire do_read = ( (~cs_del[1] | ~cs_del[2]) & (oe_del[1:0] == 2'b01)); // change output on trailing edge wire first_read = (counter == 0); wire last_read = ((counter+1) == frame_len); |