annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
1 `timescale 1ns / 1ps
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
2 //////////////////////////////////////////////////////////////////////////////////
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
3 // Company:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
4 // Engineer:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
5 //
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
6 // Create Date: 16:23:15 02/21/2006
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
7 // Design Name:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
8 // Module Name: toplevel
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
9 // Project Name:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
10 // Target Devices:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
11 // Tool versions:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
12 // Description:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
13 //
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
14 // Dependencies:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
15 //
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
16 // Revision:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
17 // Revision 0.01 - File Created
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
18 // Additional Comments:
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
19 //
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
20 //////////////////////////////////////////////////////////////////////////////////
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
21 module toplevel(CLK, PUSH, DIP, DISPLAY, LED, RIO_A03);
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
22 input CLK;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
23 input [2:1] PUSH;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
24 input [3:0] DIP;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
25 output [6:0] DISPLAY;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
26 output [3:0] LED;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
27 output RIO_A03;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
28
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
29 wire clk_div16;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
30 wire [3:0] FIFO_DIN;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
31 wire [3:0] FIFO_DOUT;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
32 wire FIFO_EMPTY;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
33 wire FIFO_FULL;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
34 wire FIFO_WREN;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
35 wire FIFO_WRCLK;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
36 wire FIFO_RDEN;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
37 wire FIFO_RDCLK;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
38 wire FIFO_RESET;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
39
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
40 // Chipscope
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
41 /*
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
42 wire [35:0] control0;
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
43 */
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
44 // Input clock buffer
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
45 IBUFG U1 ( .I(CLK), .O(clk_i));
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
46
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
47 // Clock Feedback
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
48 BUFG U3 ( .I(clk0), .O(clk_fb));
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
49
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
50 // Output clock buffer
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
51 BUFG U4 ( .I(clkdv), .O(clk_div16));
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
52
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
53 DCM #(
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
54 .CLKDV_DIVIDE(16.0),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
55 .STARTUP_WAIT("TRUE")
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
56 ) dcm_div16 (
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
57 .CLK0(clk0),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
58 .CLKDV(clkdv),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
59 .CLKFB(clk_fb),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
60 .CLKIN(clk_i)
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
61 );
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
62
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
63 fifo_top FIFO (
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
64 .din(FIFO_DIN),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
65 .wr_en(FIFO_WREN),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
66 .wr_clk(FIFO_WRCLK),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
67 .rd_en(FIFO_RDEN),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
68 .rd_clk(FIFO_RDCLK),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
69 .ainit(FIFO_RESET),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
70 .dout(FIFO_DOUT),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
71 .full(FIFO_FULL),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
72 .empty(FIFO_EMPTY)
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
73 );
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
74
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
75 test TEST (
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
76 .CLK(clk_div16),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
77 .PUSH(PUSH),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
78 .DIP(DIP),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
79 .DISPLAY(DISPLAY),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
80 .LED(LED),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
81 .FIFO_DIN(FIFO_DIN),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
82 .FIFO_DOUT(FIFO_DOUT),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
83 .FIFO_RDCLK(FIFO_RDCLK),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
84 .FIFO_RDEN(FIFO_RDEN),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
85 .FIFO_WRCLK(FIFO_WRCLK),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
86 .FIFO_WREN(FIFO_WREN),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
87 .FIFO_RESET(FIFO_RESET),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
88 .FIFO_FULL(FIFO_FULL),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
89 .FIFO_EMPTY(FIFO_EMPTY)
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
90 );
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
91
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
92 // Chipscope control
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
93 /* icon ICON (
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
94 .control0(control0)
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
95 );
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
96 */
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
97 // Chipscope ILA
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
98 /*
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
99 ila ILA (
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
100 .control(control0),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
101 .clk(clk_div16),
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
102 .trig0({FIFO_DIN, FIFO_WREN, FIFO_WRCLK, FIFO_FULL, FIFO_EMPTY})
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
103 );
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
104 */
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
105 assign RIO_A03 = LED[0];
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
106
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
107 endmodule // toplevel
65ee845bf08c Initial import of test project for Memec 3SxLC board with Xilinx XC3S400.
darius
parents:
diff changeset
108