RetroBSD
http://retrobsd.org/

SDRAM based board - a prototype run - any interest on it?
http://retrobsd.org/viewtopic.php?f=3&t=5004
Page 5 of 11

Author:  jaromir [ Wed Nov 21, 2012 8:23 am ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Pito:
I found a lot 200mA diodes in MINI-MELF. I think those (or 300mA ones) are not well suited for this purpose. 1A diodes will be better.

wiz:
I'm using cadsoft eagle, version 5.1
Second SD card... hmm.. there is not that much space and SD card (even micro-SD) is quite huge. I'll see what I can do for you.
Good point about pinheader pinout. I have no problem changing it. I can add one more signal to JTAG connector, for more IO pines i would have to add third row of pinheaders.
By the way, for this reason I'm using - for years - slightly non-standard programming header pinout. Original Microchip tools tend to use PGD and PGC on adjacent lines, not very good solution.

madscifi: I'm glad you made it working. I'll leave place for resistor networks on board, though. It can be bridged if not needed.

Author:  Pito [ Wed Nov 21, 2012 9:45 am ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

@madscifi: what about going back to the idea of a bus with parallel connected data and addresses now? Maybe that errrata was the issue with you experiments in past ;) Sorry not to mention it earlier (I just put the remainder in the sramc source and forgot)..
@jaromir: the third pin header row - what about to put the voltage reg and the diodes on the bottom side - it creates the place maybe.. Try to break out as much pins as possible..

Author:  jaromir [ Wed Nov 21, 2012 10:01 am ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

OK, next try. I added pull-up on SDRAM control lines.
USB connector moved to left side, LEDs in middle. I added second SD card holder, on bottom side. It overlaps - partially - with SD card holder on top side. It can't do it better - there is not much space on top side of board - remember it's only 5cm.
Who doesn't want second SD card, may left it unpopulated.

pito: there is not very much pins left to break out.
But we have already: 11 generic IO pins, 5 JTAG pins, 2 USARTs, programming header with 2 IO pins - 22 pins in total. Arduino team made a great business (for a reason I don't understand) with 14 IO pins.
However, it is possible to move few components on bottom side of board and add third row of headers, hopefully.

Attachments:
File comment: schematics
dr1_d.png
dr1_d.png [ 81.77 KiB | Viewed 10727 times ]
File comment: components
dr1_d_p_c.png
dr1_d_p_c.png [ 7.56 KiB | Viewed 10727 times ]
File comment: PCB
dr1_d_p.png
dr1_d_p.png [ 34.96 KiB | Viewed 10727 times ]

Author:  Pito [ Wed Nov 21, 2012 11:06 am ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Fantastic board..

What I would add is "power on" LED - sourced from the LF33 input (5+ Volt)..

I still have an issue with the mcu xtal package - I would plead for a standard low profile xtal or its smd variant..

For programming the unix.hex (via bootloader) you need an user button (or at least a 2pin header) with 10k pullup and 330ohm serial res (where to connect it?)

And now imagine you may have:
1. more boards stacked (ie 16 :) )
2. various application specific daughter boards stacked..
Q:
1. are the signals available ok for such expansion?
2. are the holes, connector centered precisely?

Author:  majenko [ Wed Nov 21, 2012 11:57 am ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Pito wrote:
1. more boards stacked (ie 16 :) )
2. various application specific daughter boards stacked..
Q:
1. are the signals available ok for such expansion?
2. are the holes, connector centered precisely?

... or are you going to end up like that stupid Arduino with one header offset by 60 mil from all the others so you can't use standard strip / matrix board?

Author:  jaromir [ Wed Nov 21, 2012 12:09 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

OK, power LED could be added.
Now I'm working on third row of headers. Almost all remaining pins broken out (there are a few left), voltage regulator moved to bottom layer, partially under SDRAM (we'll have a lot of heat here). Programming connector included into three-row monster, IIC pins are here too.

That small xtal package is normal, it is used in portable electronics quite often. If you wish, I may give you one for free.
Classic HC-49 is huge, SMD version even more.

Attachments:
dr_e_prev.png
dr_e_prev.png [ 45.94 KiB | Viewed 10719 times ]

Author:  Pito [ Wed Nov 21, 2012 1:14 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Xtal - I know I'll get one from you free, but other 7billion users might be unhappy..

2pin Header for unix.hex upload - that is needed somewhere, an existing pin could be used..

What about a resistor divider from LF33 input, put on an analog input (and 100n cap to ground) - the system can measure the input voltage (ie from battery) and take some actions if low for example..

And pls center the headers exactly symmetrically against the holes (I see it is off a little bit).

Code:
Arduino with one header offset by 60 mil from all the others so you can't use standard strip / matrix board

That was not a mistake, but a business decision :)

Author:  jaromir [ Wed Nov 21, 2012 1:21 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Good idea about measuring input voltage. It would be even better, if you could give me all ideas at once ;)
I'm leaving country for a few days, I'll be back in Monday. You (and others) have four days to think about more features to put on board :)

Author:  Pito [ Wed Nov 21, 2012 1:26 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Could you post the sch and brd, plz - we can better think about when you left..
Thanks.

Author:  wiz [ Wed Nov 21, 2012 2:26 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Jaromir and all,

I am MOST IMPRESSED. Can't wait to be playing with real RetroBSD specific hardware.

And with real hardware we will ALL have lots of new ideas :).

Looks good here :).

Wiz

Author:  wiz [ Wed Nov 21, 2012 4:05 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Jaromir,

Not sure which SD card you are using but if a normal SD there is a bottom mount connector.

Wiz

Author:  madscifi [ Wed Nov 21, 2012 6:37 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Jaromir, really nice.

Is it possible to run the two sdcards off of different controllers? Uses up more pins but potentially allows swapping of a cards while running?

Pito, I was thinking the same thing about the combined address/data lines. I don't want to revisit that right at the moment, but at some point in the future it might be interesting to do so. I'm not certain there is enough slop in the timing of reads to insert the extra code (stated without actually going and looking at the old code so comment should be taken with the appropriate amount of salt).

Author:  Pito [ Wed Nov 21, 2012 7:30 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

@madscifi - as I wrote long time back I am quite confident that:
a) it will work with combined addresses and data - the stellaris mcus using the "EPI" interface with exact wiring as I proposed a year ago (not knowing that btw)..
b) the "precise timing" of the sdram - you can clock it with 1kilohertz and it will work fine, I tell you. The timings are tough when you go with amd64, running the stuff at 166MHz data rate..
Attachment:
epi_example.jpg
epi_example.jpg [ 67 KiB | Viewed 10687 times ]

Author:  wiz [ Wed Nov 21, 2012 8:02 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Nice. Could save LOTS of pins. 24 needed if I count correctly?

Author:  wiz [ Wed Nov 21, 2012 8:09 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Madscifi,

Two cards off same pins? Yes, but error recovery REQUIRES that all pins get to zero volts. Kinda hard to do when RetroBSD is trying to recover from no file system. I was thinking more of put in two cards, power up and XCOPY working image from one to the other to make backups and also allow the 2nd card to be mounted as 'u' as well. Maybe for simple extended data storage but power down still required to remove(?) and insert cards :(.

Wiz

Author:  madscifi [ Wed Nov 21, 2012 9:20 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

You can certainly save pins by combining address and data lines, but there are some trade offs to consider. Either you lose access to some fraction of the ram or you will probably have to increase the amount of kernel ram used for the assembly code as multiple bursts are needed with careful control DQM controls in order to write to all of the ram usefully. You could save on the extra ram by decreasing the burst length, but that would generally decrease throughput by increasing overhead.

Slowing the clock down is always a possibility, but that will create to need to use lots more kernel ram to keep the processing in sync (unless you slow it down so much that you have time to watch for the clock edge and keep in sync that way).

As usual, a set of trade offs to be balanced depending on your needs or goals.

Wizard, I think you misunderstand what I was suggesting. The last schematic showed the sdcards being connected to the same sdi controllers on the PIC - i was wondering if they could be connected to different ones. Maybe I'm the one that misread the schematic?

One final comment - I don't think the pullup resistors on CE# and WR# actually help. The control lines on an SDRAM are really a control bus that is synchronously gated by the CLK signal. I think it is the CKE signal that need to be pulled, and that it should be pulled down. During startup as long as it is pulled down it does not matter what occurs on the remaining lines. By the time the PIC sets CKE high everything else has been initialized. Comments?

There might be a good argument for a pullup or down on CLK as well?

Author:  Pito [ Wed Nov 21, 2012 10:17 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Frankly, I would suggest what I put on the board presented here few months ago - a power on/off switch for the sdcards. It will cost us 2 resistors and two sot32 p-mosfets and 2 pic32 pins. SDcards need to be powered off/on when hotswapped etc. (internal init).
Attachment:
onoff.jpg
onoff.jpg [ 21.43 KiB | Viewed 10670 times ]

Author:  madscifi [ Fri Nov 23, 2012 9:07 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

While it is not a stress test I've set up a script that:
  • copies a 12 meg file to a filesystem residing on the sdram
  • compares file on sdram to the original. Stops if different
  • deletes the file off the sdram
  • prints date
  • repeats above
The swap also resides on the sdram. It has been running for about 36 hours now without incident.

Author:  Pito [ Fri Nov 23, 2012 9:16 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

During initial testing of the sramc I did a test on atmega32 testbed where I generated random data block (with _seed_), wrote them to ramdisk, and then compared them with data generated with the same _seed_ again. So no need to have the original file. What I would strongly recommend is random data written in blocks of random length at random locations and compared.
There is also a "disktool" in the distro for low level testing of external ramdisks.
Code:
# disktool
Disk testing utility.
Usage:
    disktool [options] device [blocknum]
Options:
    -a              -- test a block with alternate pattern 55/AA
    -c              -- test a block with counter pattern 0-1-2...FF
    -b              -- test blocks 0-1-2-4-8...blocknum
    -f pattern      -- fill blocks 0...blocknum with given byte value
    -v              -- verbose mode
#


PS: when using simple data for filling in the file you may easily get positive testing results even your address or data lines are shorted or disconnected..

Author:  jaromir [ Sat Nov 24, 2012 10:09 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Gentlemen, I'm back :)

Pito: everybody can bay that crystal at Mouser, Farnell or Digikey. Give me better/cheaper/more available/and SMALL alternative, I'll use it. Except for HC-49 :)
Adding PMOS switches for SD card is possible. Of course, not with BSS84, but some beefier transistor should do the job. What would it be good for? What is VUA?

wiz: I'm using microSD connector. Normal SD is almost as big as a whole board.

madscifi: two SD cards on two SPI ports... hmm... I would have to rework the board a bit. What would it be good for? I think hotswap should be possible in this simple (one SPI) configuration anyway.
I put pull-up on CE and WR because I had two unused resistors in resistor network. Pulling up/down CLK is probably not needed. However, the main point was only pulling-up DQM pins in order to put defined value on those pins during startup.
You wrote you ran your test for 36 hours - how many times did it repeat by now?

Page 5 of 11 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/