HackerTrans
TopNewTrendsCommentsPastAskShowJobs

gdevic

no profile record

Submissions

Show HN: A nibble-oriented CPU in Verilog to build a scientific calculator

github.com
119 points·by gdevic·2 माह पहले·42 comments

comments

gdevic
·30 दिन पहले·discuss
Great recipe for mediocrity. Do not follow OPs advice. (Source: 23+ years at NVIDIA).
gdevic
·2 माह पहले·discuss
That. I blatantly "stole" those from Z80 since they are elegant and effective. I have BF (flag) that gets set in ALU when the result is > 9, then DAA/DAS that add 6 or 10 (the latter wraps around as -6 since registers are 4-bit wide).

     12'b0000_0000_001?: begin : instr_daas    // DAA, DAS
       if (flags[BF_BIT])
         rx[0] <= rx[0] + (op_is_daa ? 4'd6 : 4'd10);
       flags[CF_BIT] <= flags[BF_BIT];
       state <= FETCH;
     end : instr_daas
gdevic
·2 माह पहले·discuss
I added a rather lousy video to the end of the chapter https://baltazarstudios.com/calculator-conclusion/

Creating the kind of quality video we're all used to seeing is beyond my skill level and ... motivation.
gdevic
·2 माह पहले·discuss
Corrected. Thank you!
gdevic
·2 माह पहले·discuss
There is a WebAssembly version running online here, with and without debugger panel:

https://baltazarstudios.com/files/calculator-d/Calculator.ht...

https://baltazarstudios.com/files/calculator/Calculator.html

This WebAsm code is compiled using Qt and Verilator so it runs the "hardware" and its microcode inside the simple UI shell that provides the calc interface. In the debug version you can list the ucode, set breakpoints, see regs etc.
gdevic
·2 माह पहले·discuss
Absolutely agree with the OP! My first Linux installation was in 1993 when I hauled dozens of floppies from my Uni back home (X-Windows was like 15 floppies?). Even remember emailing to Linus about some issue and he responded. Ever since I _wanted_ to be using Linux but was always put off for all the reasons described in that post. I wanted a nice OS so I can do my school/work/hobbies but not constantly having to work on that OS, figure out dozens of config files, brick the system etc.

At this point WSL2 is more than filling this void. I even stopped using VMWare since WSL is that good.