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

Topics relating to PALs, CPLDs, FPGAs, and other PLDs used for the support or creation of 65-family processors, both hardware and HDL.
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

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

Post by Arlet »

ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post by ElEctric_EyE »

Excellent. Thanks, that works!
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post 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.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post 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
Attachments
PVBRAM3alt.rar
(2.02 MiB) Downloaded 187 times
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

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

Post 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.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post by ElEctric_EyE »

That's what was confusing me, I see that part on line 113.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post 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.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post 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?
User avatar
MichaelM
Posts: 761
Joined: 23 Apr 2012
Location: Huntsville, AL

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

Post 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.
Michael A.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post 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?
User avatar
MichaelM
Posts: 761
Joined: 23 Apr 2012
Location: Huntsville, AL

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

Post 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?
Michael A.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post by ElEctric_EyE »

Thanks, I sent a .zip. If that doesn't work, I'll just send the raw verilog files.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post 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?
User avatar
MichaelM
Posts: 761
Joined: 23 Apr 2012
Location: Huntsville, AL

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

Post 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.
Michael A.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

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

Post 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!
Post Reply