6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 5:53 am

All times are UTC




Post new topic Reply to topic  [ 609 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16, 17, 18 ... 41  Next
Author Message
PostPosted: Tue Feb 05, 2013 3:55 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
See bin2hex.exe


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 05, 2013 5:39 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Excellent. Thanks, that works!

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 06, 2013 6:26 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
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.

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 06, 2013 11:00 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
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:
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 86 times

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502
Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 07, 2013 6:13 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
On line 98 it says:
Code:
    //.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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 07, 2013 11:25 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
That's what was confusing me, I see that part on line 113.

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 08, 2013 1:20 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
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.

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 10, 2013 4:39 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
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?

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 10, 2013 4:50 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 10, 2013 5:06 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
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?

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 10, 2013 5:45 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 10, 2013 6:20 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Thanks, I sent a .zip. If that doesn't work, I'll just send the raw verilog files.

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 11, 2013 1:53 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
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?

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 11, 2013 12:41 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 11, 2013 4:04 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
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:
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:
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!

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 609 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16, 17, 18 ... 41  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: