HierarchyFilesModulesSignalsTasksFunctionsHelp

/******************************************************************************/ 
/*                                                                            */ 
/* Copyright (c) 1999 Sun Microsystems, Inc. All rights reserved.             */ 
/*                                                                            */ 
/* The contents of this file are subject to the current version of the Sun    */ 
/* Community Source License, microSPARCII ("the License"). You may not use    */ 
/* this file except in compliance with the License.  You may obtain a copy    */ 
/* of the License by searching for "Sun Community Source License" on the      */ 
/* World Wide Web at http://www.sun.com. See the License for the rights,      */ 
/* obligations, and limitations governing use of the contents of this file.   */ 
/*                                                                            */ 
/* Sun Microsystems, Inc. has intellectual property rights relating to the    */ 
/* technology embodied in these files. In particular, and without limitation, */ 
/* these intellectual property rights may include one or more U.S. patents,   */ 
/* foreign patents, or pending applications.                                  */ 
/*                                                                            */ 
/* Sun, Sun Microsystems, the Sun logo, all Sun-based trademarks and logos,   */ 
/* Solaris, Java and all Java-based trademarks and logos are trademarks or    */ 
/* registered trademarks of Sun Microsystems, Inc. in the United States and   */ 
/* other countries. microSPARC is a trademark or registered trademark of      */ 
/* SPARC International, Inc. All SPARC trademarks are used under license and  */ 
/* are trademarks or registered trademarks of SPARC International, Inc. in    */ 
/* the United States and other countries. Products bearing SPARC trademarks   */ 
/* are based upon an architecture developed by Sun Microsystems, Inc.         */ 
/*                                                                            */ 
/******************************************************************************/ 
/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)sync.v
***
****************************************************************************
****************************************************************************/
[Up: interrupts sync_pci10][Up: interrupts sync_afx6][Up: interrupts sync_pci11][Up: interrupts sync_pci12][Up: interrupts sync_pci1][Up: interrupts sync_pci2][Up: interrupts sync_pci3][Up: interrupts sync_pci4][Up: interrupts sync_pci5][Up: interrupts sync_pci6][Up: interrupts sync_pci7][Up: interrupts sync_pci8][Up: interrupts sync_pci13][Up: interrupts sync_pci9][Up: interrupts sync_afx5][Up: interrupts sync_afx7][Up: afx_slave_sm sync1][Up: afx_slave_sm sync2][Up: afx_slave_sm sync3][Up: afx_slave_sm sync9][Up: afx_slave_sm sync7][Up: afx_slave_sm sync8][Up: afx_slave_sm sync4][Up: flops sync1][Up: arbiter sync_mm][Up: afxmaster s24][Up: afxmaster s25][Up: afxmaster s1][Up: afxmaster s2][Up: afxmaster s22][Up: afxmaster s13][Up: afxmaster s14]... (truncated)
module sync(
		out, 
		in_clk,
		out_clk,
		in
		);

// synchronizes from between clock domains.
// uses posedge followed by negedge.
// uses back to back metastable hardened latches.
// in_clk and out_clk are really the same "target" frequency
// clock, just opposite edges controlled by the user.

input in;
input in_clk;
input out_clk;

output out;
reg out, sync0_out;

always @(posedge in_clk)
  sync0_out <= #1 in;

always @(posedge out_clk)
  out <= #1 sync0_out;


endmodule
  
/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)REG44.v
***
*** Description:
***   44 bit wide register 
***
****************************************************************************
****************************************************************************/

[Up: afx_slave_sm reg44_0]
module REG44(   data_out,
		clock,			//clock
		load_en,		//register load enable
		data_in);

		parameter WIDTH = 44;

input 	clock;
input   load_en;
input	[(WIDTH-1):0] data_in;
output  [(WIDTH-1):0] data_out;
reg  [(WIDTH-1):0] data_out;


wire [(WIDTH-1):0] reg_data_in = load_en ? data_in : data_out;

always @(posedge clock)
begin
  data_out <= #1 reg_data_in;
end


endmodule

/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)REG32.v
***
***  Description:
***    32 bit wide register 
*** 
****************************************************************************
****************************************************************************/

[Up: afx_slave_sm reg32_0]
module REG32(   data_out,
		clock,			//clock
		load_en,		//register load enable
		data_in);		//data in 

		parameter WIDTH = 32;

input 	clock;
input   load_en;
input	[(WIDTH-1):0] data_in;
output  [(WIDTH-1):0] data_out;
reg  [(WIDTH-1):0] data_out;


wire [(WIDTH-1):0] reg_data_in = load_en ? data_in : data_out;

always @(posedge clock)
begin
  data_out <= #1 reg_data_in;
end


endmodule

/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)REG64.v
***
***  Description:
***    64 bit wide register 
*** 
****************************************************************************
****************************************************************************/

[Up: write_data reg0][Up: fifo4_64 REG64_0][Up: fifo4_64 REG64_1][Up: fifo4_64 REG64_2][Up: fifo4_64 REG64_3][Up: read_data reg0]
module REG64(   data_out,
		clock,			//clock
		load_en,		//register load enable
		data_in);		//data in 

		parameter WIDTH = 64;

input 	clock;
input   load_en;
input	[(WIDTH-1):0] data_in;
output  [(WIDTH-1):0] data_out;
reg  [(WIDTH-1):0] data_out;


wire [(WIDTH-1):0] reg_data_in = load_en ? data_in : data_out;

always @(posedge clock)
begin
  data_out <= #1 reg_data_in;
end


endmodule

/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)MUX4to1_64.v
***
***  Description:
***    4 to 1 mux, 64 bits wide to save space
*** 
****************************************************************************
****************************************************************************/

[Up: fifo4_64 MUX0]
module MUX4to1_64( data_out,
		select,			//select
		data0,			//data in 0 
		data1,			//data in 1 
		data2,			//data in 2 
		data3);			//data in 3 

		parameter WIDTH = 64;

input 	[1:0]  select;
input	[(WIDTH-1):0] data0;
input	[(WIDTH-1):0] data1;
input	[(WIDTH-1):0] data2;
input	[(WIDTH-1):0] data3;

output  [(WIDTH-1):0] data_out;

wire [(WIDTH-1):0] data_out; 

assign data_out = mux4(select,data0,data1,data2,data3);

function [(WIDTH-1):0] mux4;
input [1:0]	select;
input [(WIDTH-1):0]	data0;
input [(WIDTH-1):0]	data1;
input [(WIDTH-1):0]	data2;
input [(WIDTH-1):0]	data3;

begin
	case(select)
	2'b00: mux4 = data0;
	2'b01: mux4 = data1;
	2'b10: mux4 = data2;
	2'b11: mux4 = data3;

	endcase
end
endfunction

endmodule
/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)REG29.v
***
***  Description:
***    29 bit wide register 
*** 
****************************************************************************
****************************************************************************/

[Up: fifo4_next_29 REG0][Up: fifo4_next_29 REG1][Up: fifo4_next_29 REG2][Up: fifo4_next_29 REG3]
module REG29(   data_out,
		clock,			//clock
		load_en,		//register load enable
		data_in);

		parameter WIDTH = 29;

input 	clock;
input   load_en;
input	[(WIDTH-1):0] data_in;
output  [(WIDTH-1):0] data_out;
reg  [(WIDTH-1):0] data_out;


wire [(WIDTH-1):0] reg_data_in = load_en ? data_in : data_out;

always @(posedge clock)
begin
  data_out <= #1 reg_data_in;
end


endmodule

/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)MUX4to1_10.v
***
***  Description:
***    4 to 1 mux, 10 bits wide to save space
*** 
****************************************************************************
****************************************************************************/

[Up: fifo4_next_29 MUX0][Up: fifo4_next_29 MUX1][Up: fifo4_next_29 MUX2][Up: fifo4_next_29 MUX3][Up: fifo4_next_29 MUX4][Up: fifo4_next_29 MUX5]
module MUX4to1_10( data_out,
		select,			//select
		data0,			//data in 0 
		data1,			//data in 1 
		data2,			//data in 2 
		data3);			//data in 3 

		parameter WIDTH = 10;

input 	[1:0]  select;
input	[(WIDTH-1):0] data0;
input	[(WIDTH-1):0] data1;
input	[(WIDTH-1):0] data2;
input	[(WIDTH-1):0] data3;

output  [(WIDTH-1):0] data_out;

wire [(WIDTH-1):0] data_out; 

assign data_out = mux4(select,data0,data1,data2,data3);

function [(WIDTH-1):0] mux4;
input [1:0]	select;
input [(WIDTH-1):0]	data0;
input [(WIDTH-1):0]	data1;
input [(WIDTH-1):0]	data2;
input [(WIDTH-1):0]	data3;

begin
	case(select)
	2'b00: mux4 = data0;
	2'b01: mux4 = data1;
	2'b10: mux4 = data2;
	2'b11: mux4 = data3;

	endcase
end
endfunction

endmodule
/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)MUX4to1_32.v
***
***  Description:
***    4 to 1 mux, 32 bits wide to save space
*** 
****************************************************************************
****************************************************************************/

module MUX4to1_32( data_out,
		select,			//select
		data0,			//data in 0 
		data1,			//data in 1 
		data2,			//data in 2 
		data3);			//data in 3 

		parameter WIDTH = 32;

input 	[1:0]  select;
input	[(WIDTH-1):0] data0;
input	[(WIDTH-1):0] data1;
input	[(WIDTH-1):0] data2;
input	[(WIDTH-1):0] data3;

output  [(WIDTH-1):0] data_out;

wire [(WIDTH-1):0] data_out; 

assign data_out = mux4(select,data0,data1,data2,data3);

function [(WIDTH-1):0] mux4;
input [1:0]	select;
input [(WIDTH-1):0]	data0;
input [(WIDTH-1):0]	data1;
input [(WIDTH-1):0]	data2;
input [(WIDTH-1):0]	data3;

begin
	case(select)
	2'b00: mux4 = data0;
	2'b01: mux4 = data1;
	2'b10: mux4 = data2;
	2'b11: mux4 = data3;

	endcase
end
endfunction

endmodule
/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)pci_macros.v
***
***  Description:
***    36 bit wide register 
*** 
****************************************************************************
****************************************************************************/

[Up: interrupts HLDREG]
module REG36(   data_out,
		clock,			//clock
		load_en,		//register load enable
		data_in);		// data in

		parameter WIDTH = 36;

input 	clock;
input   load_en;
input	[(WIDTH-1):0] data_in;
output  [(WIDTH-1):0] data_out;
reg  [(WIDTH-1):0] data_out;


wire [(WIDTH-1):0] reg_data_in = load_en ? data_in : data_out;

always @(posedge clock)
begin
  data_out <= #1 reg_data_in;
end


endmodule

/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)pci_macros.v
***
***  Description:
***    4 to 1 mux, 36 bits wide to save space
*** 
****************************************************************************
****************************************************************************/
 

module MUX4to1_36( data_out,
		select,			//select
		data0,			//data in 0 
		data1,			//data in 1 
		data2,			//data in 2 
		data3);			//data in 3 

		parameter WIDTH = 36;

input 	[1:0]  select;
input	[(WIDTH-1):0] data0;
input	[(WIDTH-1):0] data1;
input	[(WIDTH-1):0] data2;
input	[(WIDTH-1):0] data3;

output  [(WIDTH-1):0] data_out;

wire [(WIDTH-1):0] data_out; 

assign data_out = mux4(select,data0,data1,data2,data3);

function [(WIDTH-1):0] mux4;
input [1:0]	select;
input [(WIDTH-1):0]	data0;
input [(WIDTH-1):0]	data1;
input [(WIDTH-1):0]	data2;
input [(WIDTH-1):0]	data3;

begin
	case(select)
	2'b00: mux4 = data0;
	2'b01: mux4 = data1;
	2'b10: mux4 = data2;
	2'b11: mux4 = data3;

	endcase
end
endfunction

endmodule
/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)pci_macros.v
***
***  Description:
***    37 bit wide register 
*** 
****************************************************************************
****************************************************************************/
 

module REG37(   data_out,
		clock,			//clock
		load_en,		//register load enable
		data_in);		// data in

		parameter WIDTH = 37;

input 	clock;
input   load_en;
input	[(WIDTH-1):0] data_in;
output  [(WIDTH-1):0] data_out;
reg  [(WIDTH-1):0] data_out;


wire [(WIDTH-1):0] reg_data_in = load_en ? data_in : data_out;

always @(posedge clock)
begin
  data_out <= #1 reg_data_in;
end


endmodule

/***************************************************************************
****************************************************************************
***
***  Program File:  @(#)pci_macros.v
***
***  Description:
***    4 to 1 mux, 37 bits wide to save space
*** 
****************************************************************************
****************************************************************************/

module MUX4to1_37( data_out,
		select,			//select
		data0,			//data in 0 
		data1,			//data in 1 
		data2,			//data in 2 
		data3);			//data in 3 

		parameter WIDTH = 37;

input 	[1:0]  select;
input	[(WIDTH-1):0] data0;
input	[(WIDTH-1):0] data1;
input	[(WIDTH-1):0] data2;
input	[(WIDTH-1):0] data3;

output  [(WIDTH-1):0] data_out;

wire [(WIDTH-1):0] data_out; 

assign data_out = mux4(select,data0,data1,data2,data3);

function [(WIDTH-1):0] mux4;
input [1:0]	select;
input [(WIDTH-1):0]	data0;
input [(WIDTH-1):0]	data1;
input [(WIDTH-1):0]	data2;
input [(WIDTH-1):0]	data3;

begin
	case(select)
	2'b00: mux4 = data0;
	2'b01: mux4 = data1;
	2'b10: mux4 = data2;
	2'b11: mux4 = data3;

	endcase
end
endfunction

endmodule
HierarchyFilesModulesSignalsTasksFunctionsHelp

This page: Created:Thu Aug 19 12:00:24 1999
From: ../../../sparc_v8/lib/rtl/pci_macros.v

Verilog converted to html by v2html 5.0 (written by Costas Calamvokis).Help