Better HN
topnewbestaskshowjobs
Log inSign up

lochsh

226 karma · joined Nov 6, 2016 (10y ago) · 47 submissions

Submissions

1.

Intro to Quantum Computing(mcla.ug ↗)

3 points · by lochsh · 2y ago · discuss

comment 4y ago · link · parent

Oxford Ionics | Senior Software Engineer | UK hybrid up to 4 days remote/1 day in office | Full time

Oxford Ionics are a quantum computing start-up building trapped-ion quantum computers. We're using Python and Rust to build our technology stack, which includes a custom optimising compiler for quantum circuits. Come join our growing team of engineers and scientists!

https://oxfordionics.bamboohr.com/jobs/view.php?id=32

comment 4y ago · link · parent

Oxford Ionics | Senior Software Engineer | UK hybrid up to 4 days remote/1 day in office | Full time

Oxford Ionics are a quantum computing start-up building trapped-ion quantum computers. We're using Python and Rust to build our technology stack, which includes a custom optimising compiler for quantum circuits. Come join our growing team of engineers and scientists!

https://oxfordionics.bamboohr.com/jobs/view.php?id=32

comment 5y ago · link · parent

Oxford Ionics | Embedded Software Engineers and Compiler Engineers | Full Time | ONSITE, HYBRID (Oxford, UK) | Quantum computing

Oxford Ionics is a small quantum computing start-up in Oxford, UK. We're looking for smart, motivated software engineers to join our growing team of engineers and scientists.

Rust | Python | FPGAs | qubits

This is a rare opportunity for a potentially really varied role, with the ability to make a big impact early on in the company's development. See links below for details

https://www.oxionics.com/careers

https://www.oxionics.com/software-engineer-embedded

https://www.oxionics.com/software-engineer-compiler

5.

Designing a RISC-V CPU, Part 2: Successfully executing (some) instructions(mcla.ug ↗)

3 points · by lochsh · 5y ago · discuss

comment 5y ago · link · parent

I've had this recommended and it looks v promising! https://vivonomicon.com/2020/04/14/learning-fpga-design-with...

Someone above has mentioned Robert Baruch too: https://github.com/RobertBaruch/nmigen-tutorial

I also found this helpful: http://blog.lambdaconcept.com/doku.php?id=nmigen:tutorial

And there is of course the IRC channel if you want to ask people questions, #nmigen on irc.freenode.net

comment 5y ago · link · parent

I'm hoping to write part 2 this weekend or next week -- I realise anyone knowledgeable of logic design won't be super excited by this first installment. It's intended mostly for people who are new like me! I look forward to writing in more detail about RISC-V and my cpu design :)

comment 5y ago · link · parent

I'm hoping to talk about this in the next installment where I actually talk about the design. It's been really interesting getting a feel for how the processes are different. It's something I've been aware of before from talking to hardware engineers, but I think I'm only truly understanding it now that I'm doing it myself :)

9.

Let's break CPython together, for fun and mischief(mcla.ug ↗)

2 points · by lochsh · 5y ago · discuss

10.

Designing a RISC-V CPU, Part 1: Learning hardware design as a software engineer(mcla.ug ↗)

150 points · by lochsh · 5y ago · 31 comments

comment 6y ago · link · parent

Thanks for bringing up variance -- this is a concept I've since learned about and have added a small update to the blog post about.

I understand your point about the `children_as_parents` example, I've added another update to point out that the mutability of the vector makes it problematic to have the `children` variable.

12.

Why can't I pass std:vector<Child*> as std:vector<Parent*>?(mcla.ug ↗)

2 points · by lochsh · 6y ago · 2 comments

13.

Emulating an STM32F4 in QEMU to test ARM assembly(mcla.ug ↗)

2 points · by lochsh · 6y ago · discuss

comment 6y ago · link · parent

I think it's worth noting that there are multiple I2C peripherals by ST -- one for STM32F1, F4, and L1; and a different one used for STM32F0, F3, F7, L0, and L4.

comment 6y ago · link · parent

I'm not sure I do have suggestions for such resources sadly :( If anyone has any please drop them here!

comment 6y ago · link · parent

I love getting compliments on my site design, thanks very much.

comment 6y ago · link · parent

Thank you for the compliment ^_^ I'm glad you found the post helpful.

This isn't a typo, actually. If you look at the documentation of the BSRR register (which is screenshotted in the blog post), it says of BRy:

> These bits are write-only [...] [Setting to 1] Resets the corresponding ODRx bit

So setting BR8 in the BSRR clears the ORD8 bit in the output data register. Because our LED is active low, this turns the LED on.

The indirection can make this a little confusing, I hope this cleans it up!

comment 6y ago · link · parent

This is lovely to hear, I'm so glad it was helpful!

comment 6y ago · link · parent

Yes, probably! But you can do it yourself without one.

Here is an example in C using libopencm3, that uses timers to trigger an interrupt used to flash LEDs https://github.com/libopencm3/libopencm3-examples/tree/maste...

comment 6y ago · link · parent

You don't need an OS to do more advanced or efficient sleeping. You could have one of the timer peripherals generate an interrupt on a regular basis, and then put the chip in a lower power sleep mode in between interrupts.

comment 6y ago · link · parent

Oh actually I was being sleepy and hadn't understood what you'd said! I hadn't realised you could do that actually, neat, thanks!

So you could do `mov r1, #0x01000000` right? nice.

comment 6y ago · link · parent

This is true! If I was writing something to be optimal speed- and size-wise, I'd do that. I think I just liked the consistency with the other parts of the code where using both was necessary :)

comment 6y ago · link · parent

I don't have experience with this, but from talking to people who do, there are indeed open source implementations. They say the documentation is a bit confusing, but it does describe everything.

This Rust library is an abstract USB library that can implement CDC serial https://docs.rs/usb-device/0.2.5/usb_device/, and this library connects it to the STM32 USB peripheral https://github.com/stm32-rs/stm32-usbd

Examples here: https://github.com/stm32-rs/stm32-usbd-examples

24.

How to flash an LED: writing ARM assembly for an STM32 microcontroller(mcla.ug ↗)

122 points · by lochsh · 6y ago · 65 comments

25.

How to flash an LED: writing ARM assembly for an STM32 microcontroller(mcla.ug ↗)

3 points · by lochsh · 6y ago · discuss

26.

Breaking CPython for Fun and Mischief(mcla.ug ↗)

4 points · by lochsh · 7y ago · discuss

27.

Breaking CPython for Fun and Mischief(mcla.ug ↗)

1 points · by lochsh · 7y ago · discuss

28.

C++20 concepts are not like Rust traits(mcla.ug ↗)

4 points · by lochsh · 7y ago · discuss

comment 7y ago · link · parent

I've made some updates to the blog post based on feedback -- thank you everyone who pointed out mistakes helpfully :)

I've made the updates clear, and linked to the archived version of the original post.

12