diff options
author | Philip Balister <philip@opensdr.com> | 2010-11-04 08:02:10 -0400 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-11-04 08:02:10 -0400 |
commit | 40080e474268291c915f8d68e99506e8ae2a3f75 (patch) | |
tree | 99581ec02c77b08a11f38af901dc9db35adcbe3a /fpga/usrp2/gpmc/edge_sync.v | |
parent | 7f8d7b0e2fef1b2d5bb9c8047380dcf958c0c49c (diff) | |
parent | 16351339eb6962288844cefefbdb3f6eece8aca1 (diff) | |
download | uhd-40080e474268291c915f8d68e99506e8ae2a3f75.tar.gz uhd-40080e474268291c915f8d68e99506e8ae2a3f75.tar.bz2 uhd-40080e474268291c915f8d68e99506e8ae2a3f75.zip |
Merge remote branch 'origin/usrp_e_next' into usrp_e_next
Diffstat (limited to 'fpga/usrp2/gpmc/edge_sync.v')
-rw-r--r-- | fpga/usrp2/gpmc/edge_sync.v | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fpga/usrp2/gpmc/edge_sync.v b/fpga/usrp2/gpmc/edge_sync.v new file mode 100644 index 000000000..5d9417c08 --- /dev/null +++ b/fpga/usrp2/gpmc/edge_sync.v @@ -0,0 +1,22 @@ + + +module edge_sync + #(parameter POSEDGE = 1) + (input clk, + input rst, + input sig, + output trig); + + reg [1:0] delay; + + always @(posedge clk) + if(rst) + delay <= 2'b00; + else + delay <= {delay[0],sig}; + + assign trig = POSEDGE ? (delay==2'b01) : (delay==2'b10); + +endmodule // edge_sync + + |