In the spirit of the suggestion that changes be posted to their own
threads, here are the changes I mentioned earlier in another thread,
before I commit them (svn diff is attached):

-change the dumpfile in rtl/vid_ctl/test/video_test.v to
video_test.vcd to match the source filename
-move a $readmemh call to video_test.v from
rtl/vid_ctl/RAMB16_S36_36.v; this makes it possible to use a relative
path to specify the memory file's location.
-rename RAMB16_S36_36.v to RAMB16_S36_S36.v to match the module
declaration within
-add rtl/vid_ctl/test/Makefile, add a target to
drivers/lib/video_controller/Makefile to produce 32x32.hex, needed by
tests
Index: rtl/vid_ctl/test/video_test.v
===================================================================
--- rtl/vid_ctl/test/video_test.v	(revision 141)
+++ rtl/vid_ctl/test/video_test.v	(working copy)
@@ -5,7 +5,7 @@
 
 
 initial begin
-    $dumpfile( "test.vcd" );
+    $dumpfile( "video_test.vcd" );
     $dumpvars;
     
     reset = 0;  // assert
@@ -46,9 +46,9 @@
 wire req_enq;
 wire req_busy = 0;
 
-   wire [255:0] fifo_data;
-   
+wire [255:0] fifo_data;
 
+
 // video out
 wire [0:127] out_pixels;
 wire [2:0] out_signals;
@@ -57,6 +57,7 @@
 
 initial begin
     reg_write = 0;
+	$readmemh("../../../drivers/lib/video_controller/32x32.hex", vc.dlist_ram.mem, 0);
 end
 
 
Index: rtl/vid_ctl/test/Makefile
===================================================================
--- rtl/vid_ctl/test/Makefile	(revision 0)
+++ rtl/vid_ctl/test/Makefile	(revision 0)
@@ -0,0 +1,22 @@
+#!/usr/bin/make
+
+VCTL_PROGDIR = ../../../drivers/lib/video_controller/
+VPATH = $(VCTL_PROGDIR)
+
+check: video_test
+	for prog in $^; do \
+		./$$prog; \
+	done;
+
+video_test: 32x32.hex video_test.v dummy_fifo.v
+
+clean:
+	rm -f *.vcd video_test
+
+%:: %.v
+	iverilog -y.. -y. -o $@ -Wall [EMAIL PROTECTED]
+
+32x32.hex:
+	cd $(VCTL_PROGDIR); make 32x32.hex
+
+.PHONY: check,clean
Index: rtl/vid_ctl/RAMB16_S36_36.v
===================================================================
--- rtl/vid_ctl/RAMB16_S36_36.v	(revision 141)
+++ rtl/vid_ctl/RAMB16_S36_36.v	(working copy)
@@ -1,51 +0,0 @@
-
-
-module RAMB16_S36_S36 (DOA, DOB, DOPA, DOPB, ADDRA, ADDRB, CLKA, CLKB, DIA, DIB, DIPA, DIPB, ENA, ENB, SSRA, SSRB, WEA, WEB);
-
-    output [31:0] DOA;
-    output [3:0] DOPA;
-    reg [31:0] DOA;
-    reg [3:0] DOPA;
-    input [8:0] ADDRA;
-    input [31:0] DIA;
-    input [3:0] DIPA;
-    input ENA, CLKA, WEA, SSRA;
-
-    output [31:0] DOB;
-    output [3:0] DOPB;
-    reg [31:0] DOB;
-    reg [3:0] DOPB;
-    input [8:0] ADDRB;
-    input [31:0] DIB;
-    input [3:0] DIPB;
-    input ENB, CLKB, WEB, SSRB;
-
-reg [35:0] mem [0:511];
-initial $readmemh("/home/admin/trunk/drivers/lib/video_controller/32x32.hex", mem, 0);
-
-integer k;
-
-
-always @(posedge CLKA) begin
-    if (ENA) begin
-        {DOPA, DOA} <= mem[ADDRA];
-        if (WEA) begin
-            mem[ADDRA] <= {DIPA, DIA};
-        end
-    end else begin
-        {DOPA, DOA} <= 'hx;
-    end
-end
-
-always @(posedge CLKB) begin
-    if (ENB) begin
-        {DOPB, DOB} <= mem[ADDRB];
-        if (WEB) begin
-            mem[ADDRB] <= {DIPB, DIB};
-        end
-    end else begin
-        {DOPB, DOB} <= 'hx;
-    end
-end
-
-endmodule
Index: rtl/vid_ctl/RAMB16_S36_S36.v
===================================================================
--- rtl/vid_ctl/RAMB16_S36_S36.v	(revision 141)
+++ rtl/vid_ctl/RAMB16_S36_S36.v	(working copy)
@@ -21,7 +21,6 @@
     input ENB, CLKB, WEB, SSRB;
 
 reg [35:0] mem [0:511];
-initial $readmemh("/home/admin/trunk/drivers/lib/video_controller/32x32.hex", mem, 0);
 
 integer k;
 
Index: rtl/vid_ctl/makeit
===================================================================
--- rtl/vid_ctl/makeit	(revision 141)
+++ rtl/vid_ctl/makeit	(working copy)
@@ -1 +1 @@
-iverilog vid_control.v ins_unit.v pixel_fetch.v pixel_send.v RAMB16_S36_36.v 
+iverilog vid_control.v ins_unit.v pixel_fetch.v pixel_send.v RAMB16_S36_S36.v 
Index: drivers/lib/video_controller/Makefile
===================================================================
--- drivers/lib/video_controller/Makefile	(revision 141)
+++ drivers/lib/video_controller/Makefile	(working copy)
@@ -25,6 +25,9 @@
 32x32.o: 32x32.c
 	$(CC) -c 32x32.c
 
+32x32.hex: 32x32
+	./32x32
+
 clean:
 	rm -f *.o *.hex *~
 	rm -f progressive.c progressive.h test.c test.h 640x480 32x32 test
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to