6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon May 20, 2024 9:20 am

All times are UTC




Post new topic Reply to topic  [ 609 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 41  Next
Author Message
PostPosted: Sat Dec 08, 2012 5:26 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
That was it! I put IBUF back in too.

Now how do I get a nice clean pic from your testbench like you've shown earlier? There are some interesting video artifacts I need some clues on how to get rid of.
I ran ISim, after I commented out $recordfile, $recordvars. ISE didn't like those.

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 08, 2012 5:37 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Does it also complain about '$fwrite()' and friends ? If not, check if there's a 0000.ppm made somewhere. If so, that should be an image of the first frame. It's in .ppm (portable pixmap format), but any decent graphics viewer should be able to open it.


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 08, 2012 5:54 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
I don't see $fwrite anywhere in the tb.v file...
I forgot this is reading from RAM too, so it's not going to work unless the verilog model takes into account the random nature of data after power-up?

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 08, 2012 6:01 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
$fwrite is on line 51 and 58, and SRAM modules don't usually randomize the contents. You can do this yourself, though. Either read the SRAM from a file, or write the contents in 'initial' block from the test bench.

Here's what I did for the Micron SDRAM on the previous board:
Code:
mt48lc16m16a2 micron(
           .Dq( sdram_dq ),
           .Addr( sdram_addr ),
           .Ba( sdram_ba ),
           .Cs_n( sdram_cs ),
           .Clk( sdram_clock ),
           .Cke( 1'b1 ),
           .Ras_n( sdram_ras ),
           .Cas_n( sdram_cas ),
           .We_n( sdram_we ),
           .Dqm( {sdram_dqm, sdram_dqm} )
       );

initial begin
         $readmemh( "bank0.bin", micron.Bank0 );
         $readmemh( "bank1.bin", micron.Bank1 );
         $readmemh( "bank2.bin", micron.Bank2 );
         $readmemh( "bank3.bin", micron.Bank3 );
    end


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 12:09 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Arlet wrote:
Hmm.. I think my FPGA died. I can't program it any more...

I forgot to ask, since one is able to program the FPGA with/without any of the 2 PROMs present. Were you programming the FPGA direct?

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 6:38 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Yes, I always programmed it directly. I'll try programming a PROM later, and see if that works. Did you already verify that it works ? Without a jumper, does it load the first or second ?

Edit: tried programming both PROMs, and pushing the button. Nothing happens.


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 12:50 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
One of the first things I did was to make sure I got the numbering of the PROMs correct.
After reading the datasheet of the tinylogic 2x1 MUX, it says all inputs have Schmitt triggers so I would assume if you don't have a jumper to pull-up or pull-down the select pin it would naturally/reliably go to GND which selects the #2 PROM. I tried it and it seems this is so.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 1:44 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3354
Location: Ontario, Canada
Quote:
all inputs have Schmitt triggers so I would assume if you don't have a jumper to pull-up or pull-down the select pin it would naturally/reliably go to GND
Unfortunately you've sllghtly misinterpreted what a Schmitt trigger does, EE. It can resolve a noisey or slowly-changing input into a crisp, valid 1 or 0 result, but it doesn't replace a pullup/pulldown. Sounds like you need to add a pulldown; otherwise you have a high-impedance input that's left floating.

If there's some contamination or other stray resistance on the PCB then the input might float high (or low) by itself. It's not reliable, of course. A floating input can also turn your circuit into something resembling a Random Number Generator :D

http://en.wikipedia.org/wiki/Schmitt_trigger

cheers
Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 4:46 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Thanks for clarifying Dr.Jeff. :) I think I've read about using one as a random number generator in another thread in the hardware section. PaulF's comment there...
I guess the jumper is mandatory then. I think Arlet was trying to get away with a working board, using absolute minimum parts.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 4:58 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
ElEctric_EyE wrote:
I think Arlet was trying to get away with a working board, using absolute minimum parts.

It's more like I just didn't know how the board is supposed to work, so I'm just guessing.


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 5:05 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Oh ok... I thought I did a good job explaining the workings in the head post. Check where the word 'design' is in boldface. I do need to update it though, because it does not talk about the 4 programmable switches that's been added but it's accurate.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 5:24 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
You're using something like fig 2-2 from UG380, but with the two PROMs chained together, and the two DO outputs going into a mux to the FPGA DIN ?

I just checked, and I don't even see a clock.


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 5:31 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Arlet wrote:
You're using something like fig 2-2 from UG380, but with the two PROMs chained together, and the two DO outputs going into a mux to the FPGA DIN ?

Correct, similar. Except my setup goes Connector->PROM1->PROM2->FPGA.
Arlet wrote:
...I just checked, and I don't even see a clock.

You don't mean TCK? That's there...
EDIT: Sec, I see what you mean...

It's there. Pin 70 of the FPGA to pin 3 of PROM1, then it snakes through/around the JTAG connector before it goes to PROM2.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 5:41 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
I mean, I don't see it wiggle on the scope when I press the button or power up the board.


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 09, 2012 5:48 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
I see 2MHz square wave for just about 1sec.

I guess that's the part of the FPGA that's cooked or the pin isn't soldered? Strange. You don't even need that signal when you're programming the FPGA direct without a PROM. I would think it should still output the clock though...

_________________
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 ... 7, 8, 9, 10, 11, 12, 13 ... 41  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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: