Added lvds and sampler
This commit is contained in:
17
rtl/arch/gw1/lvds_comparator.v
Normal file
17
rtl/arch/gw1/lvds_comparator.v
Normal file
@@ -0,0 +1,17 @@
|
||||
`timescale 1ns/1ps
|
||||
|
||||
// =============================================================================
|
||||
// LVDS comparator
|
||||
// Instantiating a GW1 TLVDS_IBUF
|
||||
// =============================================================================
|
||||
module lvds_comparator(
|
||||
input wire a,
|
||||
input wire b,
|
||||
output wire o
|
||||
);
|
||||
TLVDS_IBUF lvds_buf (
|
||||
.O(o),
|
||||
.I(a),
|
||||
.IB(b)
|
||||
);
|
||||
endmodule
|
||||
20
rtl/arch/spartan-6/lvds_comparator.v
Normal file
20
rtl/arch/spartan-6/lvds_comparator.v
Normal file
@@ -0,0 +1,20 @@
|
||||
`timescale 1ns/1ps
|
||||
|
||||
// =============================================================================
|
||||
// LVDS comparator
|
||||
// Instantiating a spartan-6 IBUFDS
|
||||
// =============================================================================
|
||||
module lvds_comparator(
|
||||
input wire a,
|
||||
input wire b,
|
||||
output wire o
|
||||
);
|
||||
IBUFDS #(
|
||||
.DIFF_TERM("FALSE"),
|
||||
.IOSTANDARD("LVDS33")
|
||||
) lvds_buf (
|
||||
.O(o),
|
||||
.I(a),
|
||||
.IB(b)
|
||||
);
|
||||
endmodule
|
||||
13
rtl/core/lvds_comparator.v
Normal file
13
rtl/core/lvds_comparator.v
Normal file
@@ -0,0 +1,13 @@
|
||||
`timescale 1ns/1ps
|
||||
|
||||
// =============================================================================
|
||||
// LVDS comparator
|
||||
// Simple pass-though model
|
||||
// =============================================================================
|
||||
module lvds_comparator(
|
||||
input wire a,
|
||||
input wire b,
|
||||
output wire o
|
||||
);
|
||||
assign o = a;
|
||||
endmodule
|
||||
23
rtl/core/sigmadelta_sampler.v
Normal file
23
rtl/core/sigmadelta_sampler.v
Normal file
@@ -0,0 +1,23 @@
|
||||
`timescale 1ns/1ps
|
||||
|
||||
// =============================================================================
|
||||
// Sigma-Delta sampler
|
||||
// Samples A>B at clk
|
||||
// =============================================================================
|
||||
module sigmadelta_sampler(
|
||||
input wire clk,
|
||||
input wire a,
|
||||
input wire b,
|
||||
output wire o
|
||||
);
|
||||
|
||||
wire comp_out;
|
||||
lvds_comparator comp (
|
||||
.a(a), .b(b), .o(comp_out)
|
||||
);
|
||||
|
||||
reg registered_comp_out;
|
||||
always @(posedge clk) registered_comp_out <= o;
|
||||
assign o = registered_comp_out;
|
||||
|
||||
endmodule
|
||||
Reference in New Issue
Block a user