Closed emard closed 5 years ago
There certainly isn't plenty of PCB space available, almost all of the "empty" space is used for routing - and although there are a few spare FPGA pins, they are mostly impossible to break out without major rerouting and higher spec PCB (which I want to avoid now).
It might be possible to use some of the FFCs with a short cable for 16-bit SDRAM.
Incidentally, the latency should be fairly similar to SDRAM - I am seeing a Trc (afaik, this is roughly random latency) of 48.75ns for the DDR3 compared to 60ns for a random SDRAM chip. Likewise a random column latency (Tck*CL) of 15ns for DDR3 compared to 18ns for SDRAM.
If minimig could be made to work with DDR3 that would be a real-world test because its latency is for sprites running of EDO RAM. Some people tried, minimig could boot of DDR3 but sprites don't work...
On 6/3/19, David Shah notifications@github.com wrote:
Incidentally, the latency should be fairly similar to SDRAM - I am seeing a Trc (afaik, this is roughly random latency) of 48.75ns for the DDR3 compared to 60ns for a random SDRAM chip. Likewise a random column latency (Tck*CL) of 15ns for DDR3 compared to 18ns for SDRAM.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/daveshah1/TrellisBoard/issues/4#issuecomment-498366201
My guess is that the problem is typical DDR3 controllers are optimised for throughput rather than latency; rather than an intrinsic fault of the memory itself.
yes DDR3 prefers to transfer a blocks of data between random accesses, so roughly saying, it's more similar to SD card than traditional RAM.
It's great for linux, it uses DDR3 very efficiently
With some practical opensource driver I look forward that other projects also try switching to DDR3
On 6/3/19, David Shah notifications@github.com wrote:
My guess is that the problem is typical DDR3 controllers are optimised for throughput rather than latency; rather than an intrinsic fault of the memory itself.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/daveshah1/TrellisBoard/issues/4#issuecomment-498382172
Dave is absolutely correct, with a DDR controller configured/designed for low latency, DDR3 will be at least as fast as SDRAM (probably faster), but optimizing for latency usually compromises bandwidth.
Iff latency is of primary concern, you should consider SSRAM, RLDRAM (I & II), etc. but I the $/b is much higher and it probably wouldn't make sense for a general purpose board (I'd personally rather see higher capacity and bandwidth).
OK! Is the DDR3 on this board fully functional can it already run risc-v linux for example?
On 6/4/19, Tommy Thorn notifications@github.com wrote:
Dave is absolutely correct, with a DDR controller configured/designed for low latency, DDR3 will be at least as fast as SDRAM (probably faster), but optimizing for latency usually compromises bandwidth.
Iff latency is of primary concern, you should consider SSRAM, RLDRAM (I & II), etc. but I the $/b is much higher and it probably wouldn't make sense for a general purpose board (I'd personally rather see higher capacity and bandwidth).
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/daveshah1/TrellisBoard/issues/4#issuecomment-498466321
Yes, both DDR3 and Ethernet are working, although had to make some hacks to LiteX to give Linux access to the full 1GB.
__ _ __ _ __
/ / (_) /____ | |/_/
/ /__/ / __/ -_)> <
/____/_/\__/\__/_/|_|
(c) Copyright 2012-2019 Enjoy-Digital
(c) Copyright 2007-2015 M-Labs Ltd
BIOS built on Jun 3 2019 19:48:31
BIOS CRC passed (f0c3adde)
--============ SoC info ================--
CPU: VexRiscv @ 75MHz
ROM: 32KB
SRAM: 4KB
L2: 8KB
MAIN-RAM: 1048576KB
--========= Peripherals init ===========--
Initializing SDRAM...
SDRAM now under software control
Read leveling:
m0, b0: |01100000| delays: 02+-01
best: m0, b0 delays: 02+-01
m1, b0: |01100000| delays: 02+-01
best: m1, b0 delays: 02+-01
m2, b0: |01110000| delays: 02+-01
best: m2, b0 delays: 02+-01
m3, b0: |01110000| delays: 02+-01
best: m3, b0 delays: 02+-01
SDRAM now under hardware control
Memtest OK
--========== Boot sequence =============--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
Timeout
Booting from network...
Local IP : 192.168.7.100
Remote IP: 192.168.7.1
Fetching from: UDP/69
Successfully downloaded 2726644 bytes from Image over TFTP
Successfully downloaded 4056576 bytes from rootfs.cpio over TFTP
Successfully downloaded 1870 bytes from rv32.dtb over TFTP
Successfully downloaded 9008 bytes from emulator.bin over TFTP
Executing booted program at 0x18000000
--============= Liftoff! ===============--
VexRiscv Machine Mode software built Jun 3 2019 19:41:01
--========== Booting Linux =============--
[ 0.000000] No DTB passed to the kernel
[ 0.000000] Linux version 5.0.9 (florent@lab) (gcc version 8.3.0 (Buildroot 2019.05-git-00938-g75f9fcd0c9-dirty)) #2 Fri May 10 15:14:31 CEST 2019
[ 0.000000] Initial ramdisk at: 0x(ptrval) (8388608 bytes)
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000c0000000-0x00000000ffffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000c0000000-0x00000000ffffffff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000ffffffff]
[ 0.000000] elf_hwcap is 0x1101
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096
[ 0.000000] Kernel command line: mem=1024M@0x40000000 rootwait console=hvc0 root=/dev/ram0 init=/sbin/init swiotlb=32
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Memory: 1028716K/1048576K available (1957K kernel code, 92K rwdata, 317K rodata, 104K init, 184K bss, 19860K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x114c1bade8, max_idle_ns: 440795203839 ns
[ 0.000269] sched_clock: 64 bits at 75MHz, resolution 13ns, wraps every 2199023255546ns
[ 0.002474] Console: colour dummy device 80x25
[ 0.138878] printk: console [hvc0] enabled
[ 0.143473] Calibrating delay loop (skipped), value calculated using timer frequency.. 150.00 BogoMIPS (lpj=300000)
[ 0.153687] pid_max: default: 32768 minimum: 301
[ 0.168633] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.175284] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.238500] devtmpfs: initialized
[ 0.280905] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.290435] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.432059] clocksource: Switched to clocksource riscv_clocksource
[ 0.742689] Unpacking initramfs...
[ 2.362331] Initramfs unpacking failed: junk in compressed archive
[ 2.388519] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[ 2.759652] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[ 2.766647] io scheduler mq-deadline registered
[ 2.770322] io scheduler kyber registered
[ 4.714238] random: get_random_bytes called from init_oops_id+0x4c/0x60 with crng_init=0
[ 4.751172] Freeing unused kernel memory: 104K
[ 4.755315] This architecture does not have kernel memory protection.
[ 4.761498] Run /init as init process
mount: mounting tmpfs on /dev/shm failed: Invalid argument
mount: mounting tmpfs on /tmp failed: Invalid argument
mount: mounting tmpfs on /run failed: Invalid argument
Starting syslogd: OK
Starting klogd: OK
Initializing random number generator... [ 7.455767] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: ip: socket: Function not implemented
ip: socket: Function not implemented
FAIL
Welcome to Buildroot
buildroot login: root
__ _ __ _ __ _ __ _ __ ___ _
/ / (_)__ __ ____ _________ ___ ____/ / (_) /____ | |/_/__| | / /____ __ / _ \(_)__ _____ __
/ /__/ / _ \/ // /\ \ /___/ _ \/ _ \/___/ /__/ / __/ -_)> </___/ |/ / -_) \ // , _/ (_-</ __/ |/ /
/____/_/_//_/\_,_//_\_\ \___/_//_/ /____/_/\__/\__/_/|_| |___/\__/_\_\/_/|_/_/___/\__/|___/
32-bits VexRiscv CPU with MMU integrated in a LiteX SoC
login[48]: root login on 'hvc0'
root@buildroot:~# free -m
total used free shared buff/cache available
Mem: 1004 3 996 0 5 990
Swap: 0 0 0
root@buildroot:~# cat /proc/cpuinfo
processor : 0
hart : 0
isa : rv32ima
mmu : sv32
uarch : spinalhdl,vexriscv
root@buildroot:~#
oho, wonderful, a running linux! maybe i'm off topic already but i'd like to know is the SD card working also?
On 6/4/19, David Shah notifications@github.com wrote:
Yes, both DDR3 and Ethernet are working, although had to make some hacks to LiteX to give Linux access to the full 1GB.
__ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| (c) Copyright 2012-2019 Enjoy-Digital (c) Copyright 2007-2015 M-Labs Ltd BIOS built on Jun 3 2019 19:48:31 BIOS CRC passed (f0c3adde) --============ SoC info ================-- CPU: VexRiscv @ 75MHz ROM: 32KB SRAM: 4KB L2: 8KB MAIN-RAM: 1048576KB --========= Peripherals init ===========-- Initializing SDRAM... SDRAM now under software control Read leveling: m0, b0: |01100000| delays: 02+-01 best: m0, b0 delays: 02+-01 m1, b0: |01100000| delays: 02+-01 best: m1, b0 delays: 02+-01 m2, b0: |01110000| delays: 02+-01 best: m2, b0 delays: 02+-01 m3, b0: |01110000| delays: 02+-01 best: m3, b0 delays: 02+-01 SDRAM now under hardware control Memtest OK --========== Boot sequence =============-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout Booting from network... Local IP : 192.168.7.100 Remote IP: 192.168.7.1 Fetching from: UDP/69 Successfully downloaded 2726644 bytes from Image over TFTP Successfully downloaded 4056576 bytes from rootfs.cpio over TFTP Successfully downloaded 1870 bytes from rv32.dtb over TFTP Successfully downloaded 9008 bytes from emulator.bin over TFTP Executing booted program at 0x18000000 --============= Liftoff! ===============-- VexRiscv Machine Mode software built Jun 3 2019 19:41:01 --========== Booting Linux =============-- [ 0.000000] No DTB passed to the kernel [ 0.000000] Linux version 5.0.9 (florent@lab) (gcc version 8.3.0 (Buildroot 2019.05-git-00938-g75f9fcd0c9-dirty)) #2 Fri May 10 15:14:31 CEST 2019 [ 0.000000] Initial ramdisk at: 0x(ptrval) (8388608 bytes) [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000c0000000-0x00000000ffffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00000000c0000000-0x00000000ffffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000ffffffff] [ 0.000000] elf_hwcap is 0x1101 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096 [ 0.000000] Kernel command line: mem=1024M@0x40000000 rootwait console=hvc0 root=/dev/ram0 init=/sbin/init swiotlb=32 [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Sorting __ex_table... [ 0.000000] Memory: 1028716K/1048576K available (1957K kernel code, 92K rwdata, 317K rodata, 104K init, 184K bss, 19860K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0 [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x114c1bade8, max_idle_ns: 440795203839 ns [ 0.000269] sched_clock: 64 bits at 75MHz, resolution 13ns, wraps every 2199023255546ns [ 0.002474] Console: colour dummy device 80x25 [ 0.138878] printk: console [hvc0] enabled [ 0.143473] Calibrating delay loop (skipped), value calculated using timer frequency.. 150.00 BogoMIPS (lpj=300000) [ 0.153687] pid_max: default: 32768 minimum: 301 [ 0.168633] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.175284] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.238500] devtmpfs: initialized [ 0.280905] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.290435] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.432059] clocksource: Switched to clocksource riscv_clocksource [ 0.742689] Unpacking initramfs... [ 2.362331] Initramfs unpacking failed: junk in compressed archive [ 2.388519] workingset: timestamp_bits=30 max_order=18 bucket_order=0 [ 2.759652] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254) [ 2.766647] io scheduler mq-deadline registered [ 2.770322] io scheduler kyber registered [ 4.714238] random: get_random_bytes called from init_oops_id+0x4c/0x60 with crng_init=0 [ 4.751172] Freeing unused kernel memory: 104K [ 4.755315] This architecture does not have kernel memory protection. [ 4.761498] Run /init as init process mount: mounting tmpfs on /dev/shm failed: Invalid argument mount: mounting tmpfs on /tmp failed: Invalid argument mount: mounting tmpfs on /run failed: Invalid argument Starting syslogd: OK Starting klogd: OK Initializing random number generator... [ 7.455767] random: dd: uninitialized urandom read (512 bytes read) done. Starting network: ip: socket: Function not implemented ip: socket: Function not implemented FAIL Welcome to Buildroot buildroot login: root __ _ __ _ __ _ __ _ __ ___ _ / / (_)__ __ ____ _________ ___ ____/ / (_) /____ | |/_/__| | / /____ __ / _ \(_)__ _____ __ / /__/ / _ \/ // /\ \ /___/ _ \/ _ \/___/ /__/ / __/ -_)> </___/ |/ / -_) \ // , _/ (_-</ __/ |/ / /____/_/_//_/\_,_//_\_\ \___/_//_/ /____/_/\__/\__/_/|_| |___/\__/_\_\/_/|_/_/___/\__/|___/ 32-bits VexRiscv CPU with MMU integrated in a LiteX SoC login[48]: root login on 'hvc0' root@buildroot:~# free -m total used free shared buff/cache available Mem: 1004 3 996 0 5 990 Swap: 0 0 0 root@buildroot:~# cat /proc/cpuinfo processor : 0 hart : 0 isa : rv32ima mmu : sv32 uarch : spinalhdl,vexriscv root@buildroot:~#
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/daveshah1/TrellisBoard/issues/4#issuecomment-498610464
Actually I'd like to ask is linux booting off SD card and SPI flash, standalone mode.
On 6/4/19, D EMARD vordah@gmail.com wrote:
oho, wonderful, a running linux! maybe i'm off topic already but i'd like to know is the SD card working also?
On 6/4/19, David Shah notifications@github.com wrote:
Yes, both DDR3 and Ethernet are working, although had to make some hacks to LiteX to give Linux access to the full 1GB.
__ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_/|_| (c) Copyright 2012-2019 Enjoy-Digital (c) Copyright 2007-2015 M-Labs Ltd BIOS built on Jun 3 2019 19:48:31 BIOS CRC passed (f0c3adde) --============ SoC info ================-- CPU: VexRiscv @ 75MHz ROM: 32KB SRAM: 4KB L2: 8KB MAIN-RAM: 1048576KB --========= Peripherals init ===========-- Initializing SDRAM... SDRAM now under software control Read leveling: m0, b0: |01100000| delays: 02+-01 best: m0, b0 delays: 02+-01 m1, b0: |01100000| delays: 02+-01 best: m1, b0 delays: 02+-01 m2, b0: |01110000| delays: 02+-01 best: m2, b0 delays: 02+-01 m3, b0: |01110000| delays: 02+-01 best: m3, b0 delays: 02+-01 SDRAM now under hardware control Memtest OK --========== Boot sequence =============-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro Timeout Booting from network... Local IP : 192.168.7.100 Remote IP: 192.168.7.1 Fetching from: UDP/69 Successfully downloaded 2726644 bytes from Image over TFTP Successfully downloaded 4056576 bytes from rootfs.cpio over TFTP Successfully downloaded 1870 bytes from rv32.dtb over TFTP Successfully downloaded 9008 bytes from emulator.bin over TFTP Executing booted program at 0x18000000 --============= Liftoff! ===============-- VexRiscv Machine Mode software built Jun 3 2019 19:41:01 --========== Booting Linux =============-- [ 0.000000] No DTB passed to the kernel [ 0.000000] Linux version 5.0.9 (florent@lab) (gcc version 8.3.0 (Buildroot 2019.05-git-00938-g75f9fcd0c9-dirty)) #2 Fri May 10 15:14:31 CEST 2019 [ 0.000000] Initial ramdisk at: 0x(ptrval) (8388608 bytes) [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000c0000000-0x00000000ffffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00000000c0000000-0x00000000ffffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000ffffffff] [ 0.000000] elf_hwcap is 0x1101 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096 [ 0.000000] Kernel command line: mem=1024M@0x40000000 rootwait console=hvc0 root=/dev/ram0 init=/sbin/init swiotlb=32 [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Sorting __ex_table... [ 0.000000] Memory: 1028716K/1048576K available (1957K kernel code, 92K rwdata, 317K rodata, 104K init, 184K bss, 19860K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0 [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x114c1bade8, max_idle_ns: 440795203839 ns [ 0.000269] sched_clock: 64 bits at 75MHz, resolution 13ns, wraps every 2199023255546ns [ 0.002474] Console: colour dummy device 80x25 [ 0.138878] printk: console [hvc0] enabled [ 0.143473] Calibrating delay loop (skipped), value calculated using timer frequency.. 150.00 BogoMIPS (lpj=300000) [ 0.153687] pid_max: default: 32768 minimum: 301 [ 0.168633] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.175284] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.238500] devtmpfs: initialized [ 0.280905] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.290435] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.432059] clocksource: Switched to clocksource riscv_clocksource [ 0.742689] Unpacking initramfs... [ 2.362331] Initramfs unpacking failed: junk in compressed archive [ 2.388519] workingset: timestamp_bits=30 max_order=18 bucket_order=0 [ 2.759652] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254) [ 2.766647] io scheduler mq-deadline registered [ 2.770322] io scheduler kyber registered [ 4.714238] random: get_random_bytes called from init_oops_id+0x4c/0x60 with crng_init=0 [ 4.751172] Freeing unused kernel memory: 104K [ 4.755315] This architecture does not have kernel memory protection. [ 4.761498] Run /init as init process mount: mounting tmpfs on /dev/shm failed: Invalid argument mount: mounting tmpfs on /tmp failed: Invalid argument mount: mounting tmpfs on /run failed: Invalid argument Starting syslogd: OK Starting klogd: OK Initializing random number generator... [ 7.455767] random: dd: uninitialized urandom read (512 bytes read) done. Starting network: ip: socket: Function not implemented ip: socket: Function not implemented FAIL Welcome to Buildroot buildroot login: root __ _ __ _ __ _ __ _ __ ___ _ / / (_)__ __ ____ _________ ___ ____/ / (_) /____ | |/_/__| | / /____ __ / _ \(_)__ _____ __ / /__/ / _ \/ // /\ \ /___/ _ \/ _ \/___/ /__/ / __/ -_)> </___/ |/ / -_) \ // , _/ (_-</ __/ |/ / /____/_/_//_/\_,_//_\_\ \___/_//_/ /____/_/\__/\__/_/|_| |___/\__/_\_\/_/|_/_/___/\__/|___/ 32-bits VexRiscv CPU with MMU integrated in a LiteX SoC login[48]: root login on 'hvc0' root@buildroot:~# free -m total used free shared buff/cache available Mem: 1004 3 996 0 5 990 Swap: 0 0 0 root@buildroot:~# cat /proc/cpuinfo processor : 0 hart : 0 isa : rv32ima mmu : sv32 uarch : spinalhdl,vexriscv root@buildroot:~#
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/daveshah1/TrellisBoard/issues/4#issuecomment-498610464
No, haven't tested that yet - I don't think the SD card bootloader is in LiteX yet. Right now it is booting using TFTP to get the kernel, device tree & ramdisk
Big board, big FPGA, plenty of pins and PCB space. DDR3 is great but some for some low-latency application SDRAM is still better. Can you see if possible to add a 32-bit 64MB SDRAM on the next release :)?