Page 15 of 41

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Tue Feb 05, 2013 3:55 pm
by Arlet

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Tue Feb 05, 2013 5:39 pm
by ElEctric_EyE
Excellent. Thanks, that works!

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Wed Feb 06, 2013 6:26 pm
by ElEctric_EyE
I have boiled the design down to CPU/ALU/RAMs/ROM & address decoding. A simple design so I can see if the cpu is running code in the simulator before adding in the video portion.

I'm thinking I might have a problem though, as I do not have a line physically coming out of the FPGA meant for a cpu reset, which is active high. I had been tying it low internally in my recent experiments. But I noticed that synthesis was negating chunks out of the cpu. So, I brought the reset line out of the top_level module and everything seems to synthesize much better and it takes longer.

Hmm, it must have a reset pulse to start running the program at the reset vector. Been away too long! Hopefully I can set something up, maybe hardwire the FPGA 'DONE' wire for a reset.

EDIT: Bah! I'm going to have to assemble the .h version with the 4 programmable pushbuttons on the backside. Won't be able to make further progress till next week. But I will post my code before then if I can get the sim working. I am using ISE14.1 currently.

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Wed Feb 06, 2013 11:00 pm
by ElEctric_EyE
Attached is the project file I've made so far. It is pure Verilog and I need some help.
I am having a hard time figuring out why ISE14.1 is giving me a warning:

Code: Select all

WARNING:HDLCompiler:1016 - "C:\FPGA\PVBRAM3alt\clock.v" Line 98: Port CLKOUT1 is not connected to this instance

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Thu Feb 07, 2013 6:13 am
by Arlet
On line 98 it says:

Code: Select all

    //.CLKOUT1               (clkout1_unused),
I'm guessing you didn't intend to use this clock output. There are 6 clock outputs, and you are only using clkout0, which is fine. This warning can be ignored.

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Thu Feb 07, 2013 11:25 am
by ElEctric_EyE
That's what was confusing me, I see that part on line 113.

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Fri Feb 08, 2013 1:20 am
by ElEctric_EyE
More work is needed on this project file. I saw the error regarding the PLL frequency not being above 400MHz. I actually meant to have an internal 70MHz clock, not 35MHz. Also, I must include some sort of constraints file, even for a single basic input clock...

ISim is not working correctly using ISE14.1, seems to be stuck in a loop. I will report back.

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Sun Feb 10, 2013 4:39 pm
by ElEctric_EyE
It is stuck in an infinite loop, but I fail to see where this is present in my code.

ISim says "Simulator is doing circuit initialization process.". Internet research on this confirmed my suspicion.

I've tried several different changes to the code with no luck. Any hints?

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Sun Feb 10, 2013 4:50 pm
by MichaelM
When this happens to me, and it's not obvious what I've done to break the code, I attempt to discover the issue by using the synthesizer.

I suspect that it's a combinatorial logic loop that you've inadvertently constructed in your RTL. The ISim simulator doesn't generally flag them, but the synthesizer does issue warnings regarding combinatorial logic loops.

PS: another thing it might be is a loop in the test bench that does not have any edge events or time delays (#x). In other words, it's a test for event with no time dependencies, so it loops infinitely because time has essentially stopped in the simulator.

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Sun Feb 10, 2013 5:06 pm
by ElEctric_EyE
The RTL schematic looks good...

I've done this project before in schematic entry and it worked, but now thinking back I had addressable ports hooked to a graphic LCD. In this project though, I do have the clock, cpuWE, cpuDatabusOut, and cpuAddressOut as outputs on the top_level, but now I don't think that this is enough even though the program in the ROM is doing a great many things to different memory locations. I think I may need at least a output port on the top_level. What do you think?

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Sun Feb 10, 2013 5:45 pm
by MichaelM
Your suggestion doesn't strike me as necessary for ISim to complete initialization.

It still feels to me that somehow you've got a loop which doesn't terminate/stabilize within a reasonable number of simulation cycles.

I tried to open your *.rar archive you posted earlier, but no luck. I must not have the correct archiver on my Windows laptop. Can you send me a link to a GitHub repo for your Verilog RTL and test bench source, or just send me the source by PM?

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Sun Feb 10, 2013 6:20 pm
by ElEctric_EyE
Thanks, I sent a .zip. If that doesn't work, I'll just send the raw verilog files.

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Mon Feb 11, 2013 1:53 am
by ElEctric_EyE
Michael, you have found a few errors in the code, which I'm grateful for you spending your time checking it out...

What version of ISE are you using?
And, Do you see the same "Simulator is doing circuit initialization process." message, where ISim is stuck?

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Mon Feb 11, 2013 12:41 pm
by MichaelM
I tend to use ISE 10.1i SP3. I have installed and uninstalled 12.4 and 13.4. I will soon receive the DVDs for 14.x.

Yes, I get the same message from ISim that you've been seeing. Nothing that I've found so far appears to be the cause of the simulation issue you've been experiencing.

Re: Concept & Design of 3.3V Parallel 16-bit VGA Boards

Posted: Mon Feb 11, 2013 4:04 pm
by ElEctric_EyE
In your PM, you were focusing on the cpu.v, which made me think back to the last modifications I made based on some more recent updates Arlet had made to his cpu.v & ALU.v. I must have made an error. Also I should have tested the .b core after I made the mod's. I put in an older version of the .b core and the loop problem disappeared. Sorry about this!

This is not related to the loop problem but how the blockRAM's were configured. Earlier I had:

Code: Select all

always @(posedge clk) begin
	if (we)
		RAM[addr] <= din;
	if (rst)
		dout <= 0;
		else
			dout <= RAM[addr];
end
which was synthesizing as a write-first style RAM, which was incorrect. I needed a no-change style RAM which the following code synthesizes correctly. Hopefully I will have this running tomorrow.

Code: Select all

always @(posedge clk) begin
	if (we) 
		RAM[addr] <= din;
		else 
			dout <= RAM[addr]; 
	if (rst)	
		dout <= 0;
end
I am watching the console now very closely during synthesis!