1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-02-07 06:44:09 +08:00
oh/asiclib/hdl/asic_iddr.v
aolofsson 289024fd89 Flattening directory tree (again)
- Creating an arbitrary 'src' directory really doesn't help much...
- Goal is to make each folder self contained
- Make meta repos and individual repos have the same directory structure
2022-06-21 14:48:48 -04:00

28 lines
922 B
Verilog

//#############################################################################
//# Function: Dual data rate input buffer #
//# Copyright: OH Project Authors. All rights Reserved. #
//# License: MIT (see LICENSE file in OH repository) #
//#############################################################################
module asic_iddr #(parameter PROP = "DEFAULT") (
input clk, // clock
input in, // data input sampled on both edges of clock
output reg outrise, // rising edge sample
output reg outfall // falling edge sample
);
// Negedge Sample
always @ (negedge clk)
outfall <= in;
// Posedge Sample
reg inrise;
always @ (posedge clk)
inrise <= in;
// Posedge Latch (for hold)
always @ (clk or inrise)
if(~clk)
outrise <= inrise;
endmodule