Live data from Hacker News

Nordic is getting involved in RISC-V

blog.nordicsemi.com

101–110 of 122 posts

Re: Nordic is getting involved in RISC-V

#101

Earlier quoted context omitted.

The owner can control Trustzone if the device is shipped with unfused OTP registers. On Raspberry Pi for example, you can write the hash of your own public key to locations 47-54 of the OTP memory block: https://www.raspberrypi.com/documentation/computers/raspberr... Here's the QuickStart for the entire process: https://github.com/raspberrypi/usbboot/blob/master/secure-bo... Note that the Raspberry Pi does not have a…

OTP and e-fuses are also evil. Devices should never be forced to become e-waste over them being set "wrong". There should always be a factory reset option that clears everything.

How do you propose patching security vulnerabilities in deployed devices?

Re: Nordic is getting involved in RISC-V

#102
post #19

Nordic is a very high volume supplier of BT chips for consumer applications, but is getting crushed by a wave of very low cost Chinese competitors. Among the western chip companies, they are the ideal candidate for RISC-V adoption. I'm very curious to see what TI is planning for RISC-V as they begin to seriously engage in the low cost general purpose microcontroller market for the first time.

> "getting crushed by a wave of very low cost Chinese competitors" That's an odd way of spelling "maintaining a stable market share in the face of Chinese competition". Going forward, IoT security is going to be an increasingly important factor for new designs. The EU is quite serious about combating security problems with IoT devices. And security is something that the new products coming out of Nordic is very serio…

> I don't think many big, serious device manufacturers are willing to risk being the target of the first catastrophic IoT attack just to save some pennies on a dirt cheap Chinese design, with some poorly verified RISC-V core thrown in with a power hungry Bluetooth radio.

The small budget OEMs will save some pennies on a dirt cheap Chinese design. The big, serious device manufacturers will do the design themselves by starting with an open reference design and making some minor modifications that suit them, then pay someone to fab it because they're shipping millions of units. Who does that even leave?

> ARM TrustZone is not something the RISC-V ecosystem has a clear standardized answer to yet.

This has almost nothing to do with IoT security, if not being directly opposed to it as a thing used to prevent people from installing custom firmware on devices the OEM fails to support.

The #1 problem in IoT security is OEMs that release a device which they neither patch nor allow anyone else to patch. And the first can't be a solution for small OEMs because they go out of business, so the only way to actually fix it is to have devices that users can update with third party firmware. For which the lack of ARM TrustZone is an advantage, since it's often used to prevent this.

Re: Nordic is getting involved in RISC-V

#103

Earlier quoted context omitted.

OTP and e-fuses are also evil. Devices should never be forced to become e-waste over them being set "wrong". There should always be a factory reset option that clears everything.

How do you propose patching security vulnerabilities in deployed devices?

Why would that require fuses? You store the firmware in flash, which can be updated to a newer version, restored to the original version or replaced entirely with third party firmware by the device's owner if the OEM fails to patch it, e.g. because they go out of business.

Re: Nordic is getting involved in RISC-V

#104
post #19

Earlier quoted context omitted.

> "getting crushed by a wave of very low cost Chinese competitors" That's an odd way of spelling "maintaining a stable market share in the face of Chinese competition". Going forward, IoT security is going to be an increasingly important factor for new designs. The EU is quite serious about combating security problems with IoT devices. And security is something that the new products coming out of Nordic is very serio…

Isn't TrustZone inherently evil, though? Isn't its main use to let the megacorps trust that your device won't do what you want and will keep secrets from you?

TrustZone doesn't run on a separate processor like the x86 TPM. It's more like a hypervisor-level ring fence than a coprocessor.

Re: Nordic is getting involved in RISC-V

#105

This is a harbinger of RISC-V's rise. ARM can't compete in power usage with RV's simple and clean ISA, just like x86 can't compete with ARM's power optimised design. Ultimately power usage decides everything. Eventually there will advanced RV implementations that outdo everything x64 and ARM can offer because of the RV design advantage and because there will be multiple players completing to capture market share. Int…

Does a "clean" vs. "messy" ISA really affect power utilisation more than low single digits? I can't see what the difference is outside the FE decoding. Perhaps an ISA having more useful instructions would matter, as we would then be able to implement hardware optimisations. But just having poor ISA encoding or inconsistency seems, to my uneducated eyes, more of a human problem than a machine problem?

> I can't see what the difference is outside the FE decoding.

In a sufficiently small CPU, the instruction decoder becomes a very significant proportion of the whole thing.

As an example of this consider the SeRV bit-serial RV32I core, which on a Xilinx FPGA uses 125 LUTs (most simple RISC-V cores use 1000-2000).

QeRV was just introduced, with a 4-bit wide data path and ALU instead of 1-bit wide. It increases speed by 3x while increasing the LUT count by 15%.

Clearly, instruction fetch / decode / control was totally dominating the data path. And still is on QeRV.

A couple of obvious RISC-V instruction decoding advantages over any of Arm's ISAs:

- src and dst registers are always encoded in the same bits in RISC-V but not in Arm. e.g. in A32 all data processing instructions have Rd in bits 15:12, except MUL & MULA put Rd in bits 19:16, and STR and other store instructions (which don't have an Rd) use bits 15:12 for the src register whose contents are to be stored. This seems trivial, but it adds significant extra muxes and wiring on a small design.

- It's the same in T16 (and the 16-bit opcodes in T32) which usually has Rd in bits 2:0, except the store instructions use those bits for a src register, and SP-relative load/store and "load address" (add a constant to SP or PC) have the Rd (again a src for store) in bits 10:8. So this hits Arm's smallest Cortex-M0 core.

- RISC-V uses slightly funky encodings for constants/offsets of varying sizes (including LUI and AUIPC, which encode bits 31:12, and conditional and unconditional branches, which do not encode bit 0) which minimises the number of places in the instruction that bits in the final 32 bit constant come from. This adds a couple of lines of code to assemblers and disassemblers, and makes it harder for humans trying to encode or decode binary instructions (mostly branch offsets), but considerably simplifies the muxes and wiring in the instruction decoder.

T16 also simply has a lot of instruction formats (19) and instructions (close to 90?) compared to RV32I's 4 formats (6 counting the different offset encoding for branch instructions, but src/dst/opcode etc are in the same places) and 37 instructions.

RISC-V's "C" extension (16 bit opcodes) adds nine more instruction formats, but that's optional and on a very small CPU core in an application with not much program code you can choose to not implement it.

Re: Nordic is getting involved in RISC-V

#106

Earlier quoted context omitted.

I think complexity always costs. You have to devote more gates to implementing it, more engineering, more area, and more power. People claim that there is no efficiency difference in ISAs, but why did Intel not implement a low power processor to compete with ARM, even when it had a process advantage? Maybe they could have pulled it off in terms of power budget but the implementation was too hard.

>I think complexity always costs. You have to devote more gates to implementing it, more engineering, more area, and more power. Complexity also benefits - instead of having to do 12 different simple instruction, you can just do the one obscure instruction appropriate to the situation. The question is whether the actual perf benefits outweigh the costs, and the only correct answer to this is to actually measure what…

> ARM currently outperforms RISC-V massively

Only if you compare CPUs with vastly different microarchitectures e.g. a 4-wide OoO Arm and a single issue in-order RISC-V, or an Arm running SIMD code to a RISC-V CPU without SIMD/Vector.

Arm has more advanced microarchitectures and Neon deployed in the field right at this moment, certainly, but RISC-V vendors have cores up to Cortex-X3 (SiFive) or even Zen/M1 level designed, simulated, and announced and those will all be in chips you can buy in 3-4 years.

Comparing similar to similar e.g. SiFive U74 vs Arm A55 (on code not using Neon) you'll find very similar performance, and in my experience the U74 usually winning.

Re: Nordic is getting involved in RISC-V

#107
post #41

This is a harbinger of RISC-V's rise. ARM can't compete in power usage with RV's simple and clean ISA, just like x86 can't compete with ARM's power optimised design. Ultimately power usage decides everything. Eventually there will advanced RV implementations that outdo everything x64 and ARM can offer because of the RV design advantage and because there will be multiple players completing to capture market share. Int…

Can you point to something specific in the Arm ISA for embedded CPUs that makes it less power-efficient than the RISC-V equivalent?

See https://news.ycombinator.com/item?id=38225898

Re: Nordic is getting involved in RISC-V

#108

This is a harbinger of RISC-V's rise. ARM can't compete in power usage with RV's simple and clean ISA, just like x86 can't compete with ARM's power optimised design. Ultimately power usage decides everything. Eventually there will advanced RV implementations that outdo everything x64 and ARM can offer because of the RV design advantage and because there will be multiple players completing to capture market share. Int…

Is risc-v really more power efficient at similar performance levels? I would think the ISA itself wouldn't matter that much for power efficiency, all things considered.

In the smallest designs e.g. RV32E vs Cortex-M0, yes.

See https://news.ycombinator.com/item?id=38225898

It's still very noticeable at Cortex M3/M4 level. Much less so in Linux applications processors.

Re: Nordic is getting involved in RISC-V

#109
post #80

Earlier quoted context omitted.

No, not inherently. The point is that simplicity and elegance enables efficiency.

Enables, but does not guarantee. The PPC ISA is simple, but the POWER chips themsleves were never designed for power efficiency. Likewise the ARM ISA is now associated with power efficiency, but there's nothing in the ISA itself that mandates power efficiency. In fact, I'll bet a clever chip designer could design an x86 (or x86_64) chip that was low power. That would be a killer exercise. I want to say some of the th…

The PPC ISA is huge, with a vast number of instructions (hundreds), which implies a lot of energy-sucking decoder circuitry -- and data path too.

RISC-V allows tiny designs with just 37 instructions. ARMv6-M aka Thumb 1 (plus CSR instructions) is also fairly minimal, though not as much as RV32I.

Re: Nordic is getting involved in RISC-V

#110
post #82

Earlier quoted context omitted.

The chips themselves are $1 qty 1. Remove the old chip, put your unlocked chip in its place.

It's beyond most people's ability, equipment and effort threshold to order 1 chip from digikey (how much is delivery on that $1?) and replace a QFN package.

Most people aren't going to be tearing down consumer goods and reflashing the firmware.

If someone wants to get a hot air station and a bunch of $1 chips and reprogram their own devices, it would cost them less than a hundred dollars, 150 tops.

Anyone can learn any skill. If you can draw anything recognizable, you can do electronics.

Post reply on HN