Author Topic: Guess who has an 64-bit RISC-V CPU?  (Read 10241 times)

0 Members and 1 Guest are viewing this topic.

Offline hamster_nzTopic starter

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Guess who has an 64-bit RISC-V CPU?
« on: March 06, 2019, 09:26:22 am »
....Me!

I spent the grand total of $19.90 (plus shipping at Seeed Studio and got a "Sipeed MAiX Dock M1w" -  See https://www.seeedstudio.com/sipeed for the range.

It is a dual-core RISC-V 64bit IMAFDC, on-chip 8MB high-speed SRAM, and 400MHz CPU clock. The 'Dock' is pretty much a brreak-out board for the CPU module, and comes with LCD and OV2640 Camera, all packed in a little plastic case.

A few lines of microPython later and it was up and running, streaming from the camera to the LCD.

I realize that the chip may not be perfect, and I will more thank likely never really use this board it in anything useful, but the purchase is mostly a political act. I am voting with money on what tech I want to see gain attention and flourish. These are most likely sold at a loss, but I hope my demand will lead to them attracting funding and eventual long-term viability.

Actually, I do have a project idea! it has specs that are better than an early 486 PC, so should be able to run Doom....
« Last Edit: March 06, 2019, 09:29:29 am by hamster_nz »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 
The following users thanked this post: oPossum

Offline Cicero

  • Contributor
  • Posts: 20
  • Country: gb
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #1 on: March 06, 2019, 11:05:58 am »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #2 on: March 06, 2019, 12:28:29 pm »
64bit? for what?
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #3 on: March 06, 2019, 12:59:37 pm »
The thing has a hardware FFT accelerator (!)
It's only size 512 but you could use the Bailey's 4-step algorithm to build a size 260K FFT with just 2 to 4 passes over the data.
Too bad the chip does not have any memory controllers for external DRAM. I do wonder what process it's on since 8MiB is a lot of SRAM which would usually take too much die area on the cheaper but obsolete processes.
Email: OwOwOwOwO123@outlook.com
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14445
  • Country: fr
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #4 on: March 06, 2019, 03:05:16 pm »
I do wonder what process it's on since 8MiB is a lot of SRAM which would usually take too much die area on the cheaper but obsolete processes.

It's said to be on a 28nm process.
The K210: https://kendryte.com/

Sounds nice.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #5 on: March 06, 2019, 03:23:27 pm »
It's good to see people making chips!

This one claims to have supervisor mode and an MMU. 8 MB is not much to run Linux on, but that's about all my first Linux machine had, back in the mid 90s. I think I have an x86 linux somewhere that runs (on qemu) in 3 MB RAM.

However I've seen reports that something in the supervisor mode doesn't follow the spec properly and people haven't been able to get Linux working on it.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #6 on: March 06, 2019, 03:38:03 pm »
Kernel 4. are of 8Mbyte of size. You need at least 32Mbyte of ram for the userspace stuff.

(my rb532 comes with 64Mbyte, and you feel it's limited as soon as you want to run more services, or as soon as you want to develop a true portscanner with advanced tracking algorithms)
 

Offline Cicero

  • Contributor
  • Posts: 20
  • Country: gb
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #7 on: March 06, 2019, 04:16:57 pm »
From the project's github repo they look to be targeting standalone and FreeRTOS, very Espressif'esque. 

So I think they're looking to position themselves in between Linux platforms (RPi etc) and the ESP32?
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #8 on: March 06, 2019, 05:10:36 pm »
Here's a presentation about "microYocto" that can run in 1.6 MB RAM and with 8 MB flash.

https://elinux.org/images/5/54/Tom.zanussi-elc2014.pdf
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1535
  • Country: au
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #9 on: March 06, 2019, 09:59:17 pm »
I spent the grand total of $19.90 (plus shipping at Seeed Studio and got a "Sipeed MAiX Dock M1w"

Hmm, I get this ? Your search 'Sipeed MAiX Dock M1w' did not match any products.
 

Offline hamster_nzTopic starter

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #10 on: March 06, 2019, 10:43:28 pm »
I spent the grand total of $19.90 (plus shipping at Seeed Studio and got a "Sipeed MAiX Dock M1w"

Hmm, I get this ? Your search 'Sipeed MAiX Dock M1w' did not match any products.

Full link ito what was oreders is https://www.seeedstudio.com/Sipeed-M1w-dock-suit-M1w-dock-2-4-inch-LCD-OV2640-K210-Dev-Board-1st-RV64-AI-board-for-Edge-Computing-p-3207.html
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline dave3533

  • Contributor
  • Posts: 22
  • Country: us
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #11 on: March 07, 2019, 01:29:04 am »
64bit? for what?

Complicating life!
 

Offline hamster_nzTopic starter

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #12 on: March 07, 2019, 01:54:56 am »
64bit? for what?

Complicating life!
Not really, you can turn off the bits you don't want with compiler switches, or just ignore them. If you only want to use 32-bit integer, but should you wish to use 64-bit integers you can.

What I think is neat is it does support quite a bit of the RISC-V specification's standard extensions. It is "RISC-V 64bit IMAFDC", meaning it has these features:

  • I = integer (it is 32I and 64I)
  • M = multiply/divide
  • A = Atomic memory operations
  • F = Single Precision Float
  • D = Double Precision Float
  • C = Compressed instructions (a bit like ARM Thumb)

As long as the H/W is mostly bug-free it does make this an ideal RISC-V target for experiencing a more feature-rich RISC architecture than the other more minimal implementation I have in silicon.

I must be odd, as I think it is quite exciting to see a feature-rich, full dual-core 64-bit CPU with floating point, with an open ISA, and you can get on an 1 sq inch module for under $US10.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #13 on: March 07, 2019, 02:05:53 am »
I must be odd, as I think it is quite exciting to see a feature-rich, full dual-core 64-bit CPU with floating point, with an open ISA, and you can get on an 1 sq inch module for under $US10.

If you don't hush about this, it's going to cost me money!

Perhaps you can continue to post about your adventures.  I don't know what I would do with the board but I have a lot of boards in that category.
 
The following users thanked this post: Cicero

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #14 on: March 07, 2019, 03:07:56 am »
64bit? for what?

Complicating life!
Not really, you can turn off the bits you don't want with compiler switches, or just ignore them. If you only want to use 32-bit integer, but should you wish to use 64-bit integers you can.

RISC-V compilers for 64 bit use 32 bit instructions for int/unsigned int and smaller values, and 64 bit for long, size_t, ptrdiff_t, uintptr_t (and of course pointers). i.e. lp64 model.

Quote
What I think is neat is it does support quite a bit of the RISC-V specification's standard extensions. It is "RISC-V 64bit IMAFDC", meaning it has these features:

  • I = integer (it is 32I and 64I)
  • M = multiply/divide
  • A = Atomic memory operations
  • F = Single Precision Float
  • D = Double Precision Float
  • C = Compressed instructions (a bit like ARM Thumb)

As long as the H/W is mostly bug-free it does make this an ideal RISC-V target for experiencing a more feature-rich RISC architecture than the other more minimal implementation I have in silicon.

The other implementation you have in silicon has all of that except 64 bit and FP. Admittedly, FP can sometimes be useful :-) As can dual core, and 8 MB RAM vs 16 KB.

Plus, this board has a lot of interesting peripherals.

Quote
I must be odd, as I think it is quite exciting to see a feature-rich, full dual-core 64-bit CPU with floating point, with an open ISA, and you can get on an 1 sq inch module for under $US10.

Yes, it's pretty impressive at that price! I'll probably get a few of them once I have a "permanent" home again rather than living out of a suitcase.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37730
  • Country: au
    • EEVblog
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #15 on: March 07, 2019, 04:49:24 am »
I have three of these boards, David2 is working on them as I type...
 
The following users thanked this post: castingflame

Offline Cicero

  • Contributor
  • Posts: 20
  • Country: gb
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #16 on: March 07, 2019, 09:55:19 am »
I must be odd, as I think it is quite exciting to see a feature-rich, full dual-core 64-bit CPU with floating point, with an open ISA, and you can get on an 1 sq inch module for under $US10.

If you don't hush about this, it's going to cost me money!

Perhaps you can continue to post about your adventures.  I don't know what I would do with the board but I have a lot of boards in that category.

Hahaha, I feel the same.  Gonna have to buy one. Just bought one.
« Last Edit: March 07, 2019, 10:10:11 am by Cicero »
 

Offline asmi

  • Super Contributor
  • ***
  • Posts: 2730
  • Country: ca
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #17 on: March 07, 2019, 02:52:16 pm »
RISC-V compilers for 64 bit use 32 bit instructions for int/unsigned int and smaller values, and 64 bit for long, size_t, ptrdiff_t, uintptr_t (and of course pointers). i.e. lp64 model.
AFAIK all RV64 standard instructions are 32 bit long (unless they implemented custom instructions which could be longer). Specification allows for implementations with switchable XLEN size if protection modes are implemented though.
I'm actually working on my very own RV32 core for FPGA (with potential extension to RV64) - so far implemented I and M extensions, and core runs at 133 MHz on A35T speed grade 2, but I'm working on pipelining it even more to reach 166 MHz (or even 200 MHz).

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #18 on: March 07, 2019, 09:37:44 pm »
RISC-V compilers for 64 bit use 32 bit instructions for int/unsigned int and smaller values, and 64 bit for long, size_t, ptrdiff_t, uintptr_t (and of course pointers). i.e. lp64 model.
AFAIK all RV64 standard instructions are 32 bit long (unless they implemented custom instructions which could be longer).

I was talking about the size of data that instructions operate on, not the size of the opcode.

In RV64 all the arithmetic/logical binary opcodes that are present in RV32 operate on 64 bit values instead of 32 bit values. RV64 adds extra ADDW, SUBW, ADDIW instructions that compute a 32 bit result and then sign-extend it into the 64 bit register, and similarly adds W versions of the immediate and dynamic shifts.

When a C program on RV64 adds two "long" values it will use ADD. When it adds two char, short, or int values it should use ADDW. Some compilers may prove that using ADD won't make any difference, and others may simply find it easier to use ADD and then explicitly sign-extend the result using SEXT.W (an assembler alias for ADDIW #0).

Quote
Specification allows for implementations with switchable XLEN size if protection modes are implemented though.

I'm not sure there's any need for protection modes to be implemented to have switchable XLEN. The programmer would just need to be careful.

I'm not sure who wanted switchable XLEN in the spec. Obviously x86 and ARM processors do this for compatibility with legacy software, but RISC-V currently has no legacy software. The systems on which end users might want to run random legacy binaries (e.g. Linux) are going with 64 bit right from the start, so there is little need to be able to run RV32 binaries. Maybe it will make sense later if/when people start to get 128 bit systems and want to run legacy 64 bit software on them.

I don't know of any RISC-V cores that currently implement switchable XLEN at runtime . Certainly none of SiFive's cores do, and I believe there are no current plans to implement it. (all the core generators allow you to choose whether you want 32 bit or 64 bit at core instantiation time)

I've seen someone state -- can't remember if it was here on on comp.arch -- that it is *compulsory* to implement switchable XLEN. They were mistaken, as that person so often is.

Quote
I'm actually working on my very own RV32 core for FPGA (with potential extension to RV64) - so far implemented I and M extensions, and core runs at 133 MHz on A35T speed grade 2, but I'm working on pipelining it even more to reach 166 MHz (or even 200 MHz).

If you can get that with 1 cycle throughput then that will be very nice!

There are open source cores that run at several hundred MHz in an Arty, but they take 3 or 4 cycles per instruction, so the MIPS is 100 or less.

SiFive's publicly available bitstreams run at 100 MHz in an Arty for simpler ones, or 75 or 50 MHz once you start adding things like MMUs and FPUs, but that RTL is optimised for SoCs not for FPGAs and the reason to put it in an FPGA is just to check that it works, and to run things like SPEC in a cycle-accurate manner before there are test SoCs, not to get the fastest possible core. Even at 50 MHz it's a lot better than Verilator :-)
 

Offline asmi

  • Super Contributor
  • ***
  • Posts: 2730
  • Country: ca
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #19 on: March 08, 2019, 12:14:36 am »
I'm not sure there's any need for protection modes to be implemented to have switchable XLEN. The programmer would just need to be careful.
You're right - these features are not connected per se, though the general idea seems to be emulation, and this require implementing multiple privilege levels.
I'm not sure who wanted switchable XLEN in the spec. Obviously x86 and ARM processors do this for compatibility with legacy software, but RISC-V currently has no legacy software. The systems on which end users might want to run random legacy binaries (e.g. Linux) are going with 64 bit right from the start, so there is little need to be able to run RV32 binaries. Maybe it will make sense later if/when people start to get 128 bit systems and want to run legacy 64 bit software on them.
The spec allows setting XLEN separately for each privilege level, which makes me think that the primary purpose of this is emulation of, say RV32 core on RV64. Same thing is allowed for extension support. This can be more useful though - for example it allows to emulate extensions absent in hardware by M-level software, so to lower privilege levels the core will appear to support more extensions that the actual hardware supports.
I don't know of any RISC-V cores that currently implement switchable XLEN at runtime . Certainly none of SiFive's cores do, and I believe there are no current plans to implement it. (all the core generators allow you to choose whether you want 32 bit or 64 bit at core instantiation time)
Risc-V is still in it's infancy - give it some time, and I'm sure such implementations will appear.

I've seen someone state -- can't remember if it was here on on comp.arch -- that it is *compulsory* to implement switchable XLEN. They were mistaken, as that person so often is.
The spec is very clear on this. This is 100% optional. And so are "switchable" extensions.
If you can get that with 1 cycle throughput then that will be very nice!
The core is fully pipelined, however obviously it never reaches 1 IPC because there are stalls on data dependencies and pipeline flushes for branches. M extension commands are multi-cycle, but all the rest are single-cycle. Currently the core has 7 stages long pipeline, however it will likely grow a bit when I get around to implementing branch prediction, as well as to increase Fmax even more.

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #20 on: March 10, 2019, 06:19:51 pm »
....Me!

I spent the grand total of $19.90 (plus shipping at Seeed Studio and got a "Sipeed MAiX Dock M1w" -  See https://www.seeedstudio.com/sipeed for the range.


I knew this was going to cost me money.  I bought 2 for just shy of $50 USD with shipping.

Quote
A few lines of microPython later and it was up and running, streaming from the camera to the LCD.


Is that code available anywhere?  That is an obvious first project so I probably want to start with that.

Quote

I realize that the chip may not be perfect, and I will more thank likely never really use this board it in anything useful, but the purchase is mostly a political act. I am voting with money on what tech I want to see gain attention and flourish. These are most likely sold at a loss, but I hope my demand will lead to them attracting funding and eventual long-term viability.

Actually, I do have a project idea! it has specs that are better than an early 486 PC, so should be able to run Doom....

Or just as a base to learn from.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #21 on: March 10, 2019, 09:06:06 pm »
In this topic (on DTB) we are trying to explore alternatives to x86 computers. I hope a day RISC-V 32/64 bit will be mentioned there.

For sure I'd like to buy a mobo with enough ram and resources (ePCI) for making a RISC-V mini workstation.


But, back to the object mentioned in this topic: can you tell more about ucPython?

 

Offline hamster_nzTopic starter

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #22 on: March 10, 2019, 09:21:02 pm »
In this topic (on DTB) we are trying to explore alternatives to x86 computers. I hope a day RISC-V 32/64 bit will be mentioned there.

For sure I'd like to buy a mobo with enough ram and resources (ePCI) for making a RISC-V mini workstation.


But, back to the object mentioned in this topic: can you tell more about ucPython?

I don't use microPython much - Just read Simon Monk's book for the BBC micro:bit, and Nicholas Tollervey's "Programming with MicroPython" and a few simple blinky projects where running Python was a nice feature.

It is a minimal set of Python, running on an interpreter that fits in mid-range micros (e.g. ESP8266, ESP32, now it seems RISC-V, and others). As with all interpreted coding environments, what is supported depends a lot on how keen and the aims the person who ported it. I haven't explored the RISC-V support at all, only cut-and-pasted one demo I found at https://robotzero.one/sipeed-maix-micropython/ but I assume that it support GPIO, I2C and maybe some of the chip's bells and whistles.

With microPython you can connect to the board's serial port and type commands directly into the 'REPL' prompt, or use an IDE link 'mu' or 'uPyCraft'. I like uPyCraft (from https://github.com/DFRobot/uPyCraft) best.

Here is the code I used to check that the camera and LCD worked:
Code: [Select]
camera = machine.ov2640 () ;
camera.init () ;
lcd = machine.st7789 () ;
lcd.init () ;
image = bytearray ( 320*240*2 ) ;
while( 1 ) :
    camera.get_image ( image ) ;
    lcd.draw_picture_default ( image ) ;

The full demo code actually includes face detection:

Code: [Select]
camera = machine.ov2640 () ;
camera.init () ;
lcd = machine.st7789 () ;
lcd.init () ;
demo = machine.face_detect () ;
demo.init () ;
image = bytearray ( 320*240*2 ) ;
while( 1 ) :
    camera.get_image ( image ) ;
    demo.process_image ( image ) ;
    lcd.draw_picture_default ( image ) ;

When I get time I hope to pull down the full Sipeed SDK, and try a few things in C.

PS. If you try these demos, you need to add a blank line with no indent to close the 'while' loop.
« Last Edit: March 10, 2019, 09:24:13 pm by hamster_nz »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #23 on: March 10, 2019, 11:22:05 pm »
Actually, I do have a project idea! it has specs that are better than an early 486 PC, so should be able to run Doom....

It just occurred to me that the Raspberry Pi is total overkill for the "PiDP-11". This board would be more than adequate for the task, or indeed doing full system emulation of a VAX with the typical 2 or 4 MB RAM. Even with emulating the MMU and so forth it would still be considerably faster than the real thing. Should be pretty easy to get SimH working on it.





 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Guess who has an 64-bit RISC-V CPU?
« Reply #24 on: March 11, 2019, 09:44:13 pm »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf