Line 40... |
Line 40... |
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
// Global buffer
|
// Global buffer
|
// usage:
|
// usage:
|
// use to enable global buffers for high fan out signals such as clock and reset
|
// use to enable global buffers for high fan out signals such as clock and reset
|
altera
|
//altera
|
// ALTERA
|
// ALTERA
|
//ACTEL
|
//ACTEL
|
// sync reset
|
// sync reset
|
// input active lo async reset, normally from external reset generator and/or switch
|
// input active lo async reset, normally from external reset generator and/or switch
|
// output active high global reset sync with two DFFs
|
// output active high global reset sync with two DFFs
|
Line 379... |
Line 379... |
parameter width = 32;
|
parameter width = 32;
|
parameter nr_of_ports = 4;
|
parameter nr_of_ports = 4;
|
input [width-1:0] a3, a2, a1, a0;
|
input [width-1:0] a3, a2, a1, a0;
|
input [nr_of_ports-1:0] sel;
|
input [nr_of_ports-1:0] sel;
|
output reg [width-1:0] dout;
|
output reg [width-1:0] dout;
|
reg [width-1:0] tmp [nr_of_ports-1:0];
|
wire [width-1:0] tmp [nr_of_ports-1:0];
|
integer i;
|
integer i;
|
// and
|
// and
|
assign tmp[0] = {width{sel[0]}} & a0;
|
assign tmp[0] = {width{sel[0]}} & a0;
|
assign tmp[1] = {width{sel[1]}} & a1;
|
assign tmp[1] = {width{sel[1]}} & a1;
|
assign tmp[2] = {width{sel[2]}} & a2;
|
assign tmp[2] = {width{sel[2]}} & a2;
|
Line 395... |
Line 395... |
parameter width = 32;
|
parameter width = 32;
|
parameter nr_of_ports = 5;
|
parameter nr_of_ports = 5;
|
input [width-1:0] a4, a3, a2, a1, a0;
|
input [width-1:0] a4, a3, a2, a1, a0;
|
input [nr_of_ports-1:0] sel;
|
input [nr_of_ports-1:0] sel;
|
output reg [width-1:0] dout;
|
output reg [width-1:0] dout;
|
reg [width-1:0] tmp [nr_of_ports-1:0];
|
wire [width-1:0] tmp [nr_of_ports-1:0];
|
integer i;
|
integer i;
|
// and
|
// and
|
assign tmp[0] = {width{sel[0]}} & a0;
|
assign tmp[0] = {width{sel[0]}} & a0;
|
assign tmp[1] = {width{sel[1]}} & a1;
|
assign tmp[1] = {width{sel[1]}} & a1;
|
assign tmp[2] = {width{sel[2]}} & a2;
|
assign tmp[2] = {width{sel[2]}} & a2;
|
Line 412... |
Line 412... |
parameter width = 32;
|
parameter width = 32;
|
parameter nr_of_ports = 6;
|
parameter nr_of_ports = 6;
|
input [width-1:0] a5, a4, a3, a2, a1, a0;
|
input [width-1:0] a5, a4, a3, a2, a1, a0;
|
input [nr_of_ports-1:0] sel;
|
input [nr_of_ports-1:0] sel;
|
output reg [width-1:0] dout;
|
output reg [width-1:0] dout;
|
reg [width-1:0] tmp [nr_of_ports-1:0];
|
wire [width-1:0] tmp [nr_of_ports-1:0];
|
integer i;
|
integer i;
|
// and
|
// and
|
assign tmp[0] = {width{sel[0]}} & a0;
|
assign tmp[0] = {width{sel[0]}} & a0;
|
assign tmp[1] = {width{sel[1]}} & a1;
|
assign tmp[1] = {width{sel[1]}} & a1;
|
assign tmp[2] = {width{sel[2]}} & a2;
|
assign tmp[2] = {width{sel[2]}} & a2;
|
Line 1698... |
Line 1698... |
input rd;
|
input rd;
|
output fifo_empty;
|
output fifo_empty;
|
input rd_clk;
|
input rd_clk;
|
input rd_rst;
|
input rd_rst;
|
wire [addr_width:1] wadr, wadr_bin, radr, radr_bin;
|
wire [addr_width:1] wadr, wadr_bin, radr, radr_bin;
|
vl_fifo_1r1w_async (
|
/*
|
d, wr, fifo_full, wr_clk, wr_rst,
|
vl_fifo_1r1w_async (
|
q, rd, fifo_empty, rd_clk, rd_rst
|
d, wr, fifo_full, wr_clk, wr_rst,
|
);
|
q, rd, fifo_empty, rd_clk, rd_rst
|
|
);
|
|
*/
|
vl_cnt_gray_ce_bin
|
vl_cnt_gray_ce_bin
|
# ( .length(addr_width))
|
# ( .length(addr_width))
|
fifo_wr_adr( .cke(wr), .q(wadr), .q_bin(wadr_bin), .rst(wr_rst), .clk(wr_clk));
|
fifo_wr_adr( .cke(wr), .q(wadr), .q_bin(wadr_bin), .rst(wr_rst), .clk(wr_clk));
|
vl_cnt_gray_ce_bin
|
vl_cnt_gray_ce_bin
|
# (.length(addr_width))
|
# (.length(addr_width))
|