diff toplevel.v @ 3:65ee845bf08c default tip

Initial import of test project for Memec 3SxLC board with Xilinx XC3S400. Uses a FIFO and flashes some LEDs.
author darius
date Fri, 24 Feb 2006 14:01:26 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toplevel.v	Fri Feb 24 14:01:26 2006 +0000
@@ -0,0 +1,108 @@
+`timescale 1ns / 1ps
+//////////////////////////////////////////////////////////////////////////////////
+// Company: 
+// Engineer: 
+// 
+// Create Date:    16:23:15 02/21/2006 
+// Design Name: 
+// Module Name:    toplevel 
+// Project Name: 
+// Target Devices: 
+// Tool versions: 
+// Description: 
+//
+// Dependencies: 
+//
+// Revision: 
+// Revision 0.01 - File Created
+// Additional Comments: 
+//
+//////////////////////////////////////////////////////////////////////////////////
+module toplevel(CLK, PUSH, DIP, DISPLAY, LED, RIO_A03);
+   input CLK;
+   input [2:1] PUSH;
+   input [3:0] DIP;
+   output [6:0] DISPLAY;
+   output [3:0] LED;
+   output 	RIO_A03;
+ 	
+   wire 	 clk_div16;
+   wire [3:0] 	 FIFO_DIN;
+   wire [3:0] 	 FIFO_DOUT;
+   wire          FIFO_EMPTY;
+   wire          FIFO_FULL;
+   wire          FIFO_WREN;
+   wire          FIFO_WRCLK;
+   wire          FIFO_RDEN;
+   wire          FIFO_RDCLK;
+   wire          FIFO_RESET;
+
+   // Chipscope
+/*
+   wire [35:0] 	 control0;
+  */ 
+   // Input clock buffer
+   IBUFG     U1 ( .I(CLK), .O(clk_i));
+
+   // Clock Feedback
+   BUFG      U3 ( .I(clk0), .O(clk_fb));
+
+   // Output clock buffer
+   BUFG      U4 ( .I(clkdv), .O(clk_div16));
+
+   DCM #(
+	.CLKDV_DIVIDE(16.0),
+	.STARTUP_WAIT("TRUE")
+	) dcm_div16 (
+		     .CLK0(clk0),
+		     .CLKDV(clkdv),
+		     .CLKFB(clk_fb),
+		     .CLKIN(clk_i)
+		     );
+   
+   fifo_top FIFO (
+	      .din(FIFO_DIN),
+	      .wr_en(FIFO_WREN),
+	      .wr_clk(FIFO_WRCLK),
+	      .rd_en(FIFO_RDEN),
+	      .rd_clk(FIFO_RDCLK),
+	      .ainit(FIFO_RESET),
+	      .dout(FIFO_DOUT),
+	      .full(FIFO_FULL),
+	      .empty(FIFO_EMPTY)
+	      );
+
+   test TEST (
+	      .CLK(clk_div16),
+	      .PUSH(PUSH),
+	      .DIP(DIP),
+	      .DISPLAY(DISPLAY),
+	      .LED(LED),
+	      .FIFO_DIN(FIFO_DIN),
+	      .FIFO_DOUT(FIFO_DOUT),
+	      .FIFO_RDCLK(FIFO_RDCLK),
+	      .FIFO_RDEN(FIFO_RDEN),
+	      .FIFO_WRCLK(FIFO_WRCLK),
+	      .FIFO_WREN(FIFO_WREN),
+	      .FIFO_RESET(FIFO_RESET),
+	      .FIFO_FULL(FIFO_FULL),
+	      .FIFO_EMPTY(FIFO_EMPTY)
+	      );
+
+   // Chipscope control
+/*   icon ICON (
+	      .control0(control0)
+	      );
+*/   
+   // Chipscope ILA
+/*
+   ila ILA (
+	    .control(control0),
+	    .clk(clk_div16),
+	    .trig0({FIFO_DIN, FIFO_WREN, FIFO_WRCLK, FIFO_FULL, FIFO_EMPTY})
+	    );
+ */
+   assign 	 RIO_A03 = LED[0];
+ 	 
+endmodule // toplevel
+