Altera_Forum
Honored Contributor
16 years agoDE2-70 with D5M Camera
Hey,
I am working with the DE2-70 dev kit and the D5M camera. From my understanding, the demo for the camera uses both sdrams on the kit. I am trying to make it so the camera only uses one sdram. However, I haven't been successful with this thus far... The things that I have altered are in the Sdram_Control_4Port.v file:
// Internal Address & Length Control
always@(posedge CLK or negedge RESET_N)
begin
if(!RESET_N)
begin
rWR1_ADDR <= 0;
rWR2_ADDR <= 22'h200000;
rRD1_ADDR <= 0;
rRD2_ADDR <= 22'h200000;
rWR1_MAX_ADDR <= 1280*1024;
rWR2_MAX_ADDR <= 22'h200000+1280*1024;
rRD1_MAX_ADDR <= 1280*1024;
rRD2_MAX_ADDR <= 22'h200000+1280*1024;
rWR1_LENGTH <= 256;
rWR2_LENGTH <= 256;
rRD1_LENGTH <= 256;
rRD2_LENGTH <= 256;
end
and in the top file:
Sdram_Control_4Port u8 ( // HOST Side
.REF_CLK(iCLK_50),
.RESET_N(1'b1),
.CLK(sdram_ctrl_clk),
// FIFO Write Side 1
.WR1_DATA({sCCD_G,sCCD_B}),
.WR1(sCCD_DVAL),
.WR1_ADDR(0),
.WR1_MAX_ADDR(1280*1024),
.WR1_LENGTH(9'h100),
.WR1_LOAD(!DLY_RST_0),
.WR1_CLK(CCD_PIXCLK),
// FIFO Read Side 1
.RD1_DATA(Read_DATA2),
.RD1(Read),
.RD1_ADDR(0),
.RD1_MAX_ADDR(1280*1024),
.RD1_LENGTH(9'h100),
.RD1_LOAD(!DLY_RST_0),
.RD1_CLK(VGA_CTRL_CLK),
// FIFO Write Side 2
.WR2_DATA({sCCD_G, sCCD_R}),
.WR2(sCCD_DVAL),
.WR2_ADDR(22'h200000),
.WR2_MAX_ADDR(22'h200000+1280*1024),
.WR2_LENGTH(9'h100),
.WR2_LOAD(!DLY_RST_0),
.WR2_CLK(CCD_PIXCLK),
// FIFO Read Side 2
.RD2_DATA(Read_DATA1),
.RD2(Read),
.RD2_ADDR(22'h200000),
.RD2_MAX_ADDR(22'h200000+1280*1024),
.RD2_LENGTH(9'h100),
.RD2_LOAD(!DLY_RST_0),
.RD2_CLK(VGA_CTRL_CLK),
// SDRAM Side
.SA(oDRAM0_A),
.BA(oDRAM0_BA),
.CS_N(oDRAM0_CS_N),
.CKE(oDRAM0_CKE),
.RAS_N(oDRAM0_RAS_N),
.CAS_N(oDRAM0_CAS_N),
.WE_N(oDRAM0_WE_N),
.DQ(DRAM_DQ),
.DQM({oDRAM0_UDQM1,oDRAM0_LDQM0})
);
When I run it - the vga output is messed up.. I have looked at the older camera demo and they use a single sdram for it - I am not sure what I am doing wrong or haven't done. Thanks in advance..