[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5770 - gnuradio/branches/developers/thottelt/simulati
From: |
thottelt |
Subject: |
[Commit-gnuradio] r5770 - gnuradio/branches/developers/thottelt/simulations |
Date: |
Tue, 12 Jun 2007 13:12:53 -0600 (MDT) |
Author: thottelt
Date: 2007-06-12 13:12:53 -0600 (Tue, 12 Jun 2007)
New Revision: 5770
Added:
gnuradio/branches/developers/thottelt/simulations/fake_fx2_test.v
gnuradio/branches/developers/thottelt/simulations/rx_fake_fx2.v
gnuradio/branches/developers/thottelt/simulations/strobe_gen_test.v
Log:
added some missing simulation files
Added: gnuradio/branches/developers/thottelt/simulations/fake_fx2_test.v
===================================================================
--- gnuradio/branches/developers/thottelt/simulations/fake_fx2_test.v
(rev 0)
+++ gnuradio/branches/developers/thottelt/simulations/fake_fx2_test.v
2007-06-12 19:12:53 UTC (rev 5770)
@@ -0,0 +1,22 @@
+module fake_fx2_test(
+ input [15:0] usbdata,
+ input usbclk,
+ input WR,
+ input reset,
+ output reg have_space
+ );
+
+reg[15:0] fakefifo;
+
+always @(posedge usbclk) begin
+ if (reset)
+ have_space <= 0;
+ else if (WR == 1)
+ fakefifo <= usbdata;
+
+end
+
+always
+ #200 have_space <= ~have_space;
+
+endmodule
Property changes on:
gnuradio/branches/developers/thottelt/simulations/fake_fx2_test.v
___________________________________________________________________
Name: svn:executable
+ *
Added: gnuradio/branches/developers/thottelt/simulations/rx_fake_fx2.v
===================================================================
--- gnuradio/branches/developers/thottelt/simulations/rx_fake_fx2.v
(rev 0)
+++ gnuradio/branches/developers/thottelt/simulations/rx_fake_fx2.v
2007-06-12 19:12:53 UTC (rev 5770)
@@ -0,0 +1,103 @@
+module rx_fake_fx2();
+
+reg usbclk;
+reg rxclk;
+reg reset;
+reg bus_reset;
+wire [15:0] usbdata;
+reg RD;
+
+wire have_pkt_rdy;
+wire rxstrobe;
+wire rx_underrun;
+wire [15:0]ch_0;
+wire [15:0]ch_1;
+
+/* NOT USED YET */
+reg clear_status;
+reg channels;
+
+rx_buffer_inband rx_buffer_inband_ (
+ .usbclk(usbclk),
+ .bus_reset(bus_reset),
+ .reset(reset),
+ .reset_regs(reset_regs),
+ .usbdata(usbdata),
+ .RD(RD),
+ .have_pkt_rdy(have_pkt_rdy),
+ .rx_overrun(rx_overrun),
+ .channels(channels),
+ .ch_0(ch_0),
+ .ch_1(ch_1),
+ .ch_2(),.ch_3(),.ch_4(),.ch_5(),.ch_6(),.ch_7(),
+ .rxclk(rxclk),
+ .rxstrobe(rxstrobe),
+ .clear_status(clear_status),
+ .serial_addr(),.serial_data(),
+ .serial_strobe(),
+ .debugbus() );
+
+strobe_gen strobe_gen_test(
+ .clock(rxclk),
+ .reset(reset),
+ .enable(1'd1),
+ .rate(8'd6),
+ .strobe_in(1'd1),
+ .strobe(rxstrobe) );
+
+initial begin
+ usbclk = 0;
+ rxclk = 0;
+ RD = 0;
+ reset = 1;
+ bus_reset = 1;
+
+ clear_status = 0;
+ channels = 0;
+
+ #400 reset = 0;
+ bus_reset = 0;
+end
+
+reg [3:0]state;
+reg [8:0]count;
+
+parameter IDLE = 0;
+parameter RCV = 1;
+
+always @(posedge usbclk)
+begin
+ if (bus_reset)
+ state <= IDLE;
+ else case (state)
+ IDLE: begin
+ if (have_pkt_rdy)
+ begin
+ state <= RCV;
+ count <= 1;
+ end
+ end
+
+ RCV: begin
+ count <= count + 1;
+ RD <= 1;
+ $display(usbdata);
+
+ if (count == 257)
+ begin
+ RD <= 0;
+ state <= IDLE;
+ end
+ end
+
+ default: $display("fix test code");
+
+ endcase
+end
+
+always
+ #64 usbclk = ~ usbclk;
+always
+ #48 rxclk = ~ rxclk;
+
+endmodule
Property changes on:
gnuradio/branches/developers/thottelt/simulations/rx_fake_fx2.v
___________________________________________________________________
Name: svn:executable
+ *
Added: gnuradio/branches/developers/thottelt/simulations/strobe_gen_test.v
===================================================================
--- gnuradio/branches/developers/thottelt/simulations/strobe_gen_test.v
(rev 0)
+++ gnuradio/branches/developers/thottelt/simulations/strobe_gen_test.v
2007-06-12 19:12:53 UTC (rev 5770)
@@ -0,0 +1,39 @@
+module strobe_gen_test();
+
+reg clock;
+reg reset;
+reg enable;
+reg [7:0] rate;
+reg strobe_in;
+wire strobe;
+
+strobe_gen strobe_gen_test(
+ .clock(clock),
+ .reset(reset),
+ .enable(enable),
+ .rate(rate),
+ .strobe_in(strobe_in),
+ .strobe(strobe) );
+
+initial begin
+ // Setup the initial conditions
+ reset = 1;
+ clock = 0;
+ rate = 8'd3;
+ strobe_in = 1;
+ enable = 1;
+
+ #40 reset = 1'b0 ;
+
+ // Wait a few clocks
+ repeat (5) begin
+ @(posedge clock)
+ reset = 1'b0 ;
+ end
+end
+
+always
+ #5 clock = ~clock;
+
+
+endmodule
Property changes on:
gnuradio/branches/developers/thottelt/simulations/strobe_gen_test.v
___________________________________________________________________
Name: svn:executable
+ *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5770 - gnuradio/branches/developers/thottelt/simulations,
thottelt <=