From b31c07157b7b8ca7e8823749e140fcab24b787d2 Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Tue, 8 Oct 2013 22:05:21 -0400 Subject: working xula2 sim/syn/prog system --- tb/xula2_tb.v | 43 +++++++++++++++++++++++++++++++++++++++++++ tb/xula2_tb.wcfg | 30 ++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100755 tb/xula2_tb.v create mode 100644 tb/xula2_tb.wcfg (limited to 'tb') diff --git a/tb/xula2_tb.v b/tb/xula2_tb.v new file mode 100755 index 0000000..6fd8316 --- /dev/null +++ b/tb/xula2_tb.v @@ -0,0 +1,43 @@ +`timescale 1ns/1ps +module xula2_tb; + +reg synth_clk_12mhz; +always @(synth_clk_12mhz) begin + #83333.33 synth_clk_12mhz <= ~synth_clk_12mhz; +end + +initial begin + // the first event that sets the clock in motion + #0 synth_clk_12mhz <= 1'b0; +end + +reg reset; +wire led; +wire [31:0] chan; +assign chan[0] = reset; +assign led = chan[10]; + +main main_inst ( + .clock_12mhz(synth_clk_12mhz), + .chan(chan), + .chan_clk(), + .microsd_cs(), + .flash_cs(), + .flash_sclk(), + .flash_mosi(), + .flash_miso() +); + + +initial begin + #0 + reset <= 1'b1; + #1000000000 // 1 s delay + #1000000000 // 1 s delay + #1000000000 // 1 s delay + reset <= 1'b0; + + $finish(); +end + +endmodule diff --git a/tb/xula2_tb.wcfg b/tb/xula2_tb.wcfg new file mode 100644 index 0000000..7a75798 --- /dev/null +++ b/tb/xula2_tb.wcfg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + synth_clk_12mhz + synth_clk_12mhz + + + chan[31:0] + chan[31:0] + + + reset + reset + + + led + led + + -- cgit v1.2.3