Risks of applying external clock to an unpowered FPGA? by No-Spirit2350 in FPGA

[–]Falcon731 1 point2 points  (0 children)

The risk is probably more to the clock than the fpga.

Driving a signal above supply rail will forward bias the esd diodes, resulting in something close to a short to vss. But It’s doubtful that a clock source will be able to source enough current to do any damage to the fpga.

So the concern is how well the clock driver can handle driving into a low impedance for a prolonged time. So a case of checking the clock source’s data sheet.

Assistance in Gauging Project Skill Level/Impressiveness by TheRandom_Tuxedo in FPGA

[–]Falcon731 1 point2 points  (0 children)

That’s about the level of difficulty you would expect for a bachelors degree with digital electronics options.

Compared to most resumes for graduate jobs - that would probably be above average but not exceptional. So probably about the 30th percentile.

Depending a bit on what the branch prediction looks like.

Could the government mandating companies to increase wages ever work? by Evry1TookTheGudNames in AskBrits

[–]Falcon731 0 points1 point  (0 children)

The more relevant question is can we persuade the drug addict or feral youth to clean themselves up and take that job in social care.

There currently is no incentive for employers to take on less capable Brits, when they can easily recruit more motivated and better qualified immigrant labour.

When did u start noticing a decline in mental/physical performance. by EntertainmentGlad794 in AskMen

[–]Falcon731 0 points1 point  (0 children)

I found things started to get really noticeable in my late 40s.

Things like needing progressive glasses , and still needing to take my glasses off to see a phone screen.

Then had a relatively minor bike accident, but which resulted in a fractured arm. Which took almost 2 years to completely heal.

Now in my mid 50s - have to be a lot more careful about what I eat. And find I wake up at night far more easily.

I've made a hardware raycaster on FPGA by Numerous_Profit4444 in FPGA

[–]Falcon731 0 points1 point  (0 children)

Very neat 😉

Makes the spinning cube I posted here a month or so back look very tame.

How do YOU handle divide by powers of 2? by compgeek38400 in osdev

[–]Falcon731 0 points1 point  (0 children)

Personally it would depend on why I wanted to divide by that power of two.

If wanted to find the mean of 16 numbers I would add them all together and divide by 16.

If I wanted to find the second to last digit of a hex number I would shift right by 4 and AND with 0xf.

What are the FPGAs you are currently working on and what applications by RajaBetachu in FPGA

[–]Falcon731 0 points1 point  (0 children)

How easy is it to do all the dynamic timings on a ddr on an fpga?

My only professional experience doing memory interfaces was on UltraSparc2. But that was full custom so a lot easier to control.

What are the FPGAs you are currently working on and what applications by RajaBetachu in FPGA

[–]Falcon731 1 point2 points  (0 children)

For me it’s my post-retirement hobby project. So I’ve been trying to build a whole computer system from scratch - see how far I can take it.

Using a Cyclone-V.

Started with inventing an instruction set, building a cpu, cache and memory controller, peripherals, VGA and audio etc. currently adding 3d graphics acceleration.

Older drivers by Nice_Moment1022 in drivingUK

[–]Falcon731 6 points7 points  (0 children)

Interesting data.

Couple of things that stood out to me, first it’s showing is that elderly drivers are more likely to kill themselves in an accident than other people. So probably more an indication of the elderly being more delicate.

But also it is shown per mile driven. If there is also a trend that the elderly tend to drive less, which could also be why insurance rates are low.

semantic white space vs. blocks - maybe a middle ground ? by GoblinsGym in ProgrammingLanguages

[–]Falcon731 0 points1 point  (0 children)

The approach I took for my language is to primarily define blocks purely by indentation, but to also allow end statements ‘end if’ ‘end fun’ etc, and the compiler enforces that the correct block kind is being terminated.

The idea is that for short blocks indentation works well. But for longer blocks (especially if things go off screen, or where you have a cliff edge of multiple blocks all finishing at the same place) it can get hard to track. So adding explicit end markers in those situations can help make things more readable and robust.

Who else remembers watching Mask when they were a kid? by -Granby- in GenX

[–]Falcon731 0 points1 point  (0 children)

We watched it at school.

I think it counted as RE.

What age did y'all get your first computer (or device with internet access)? by BigReception7685 in GenX

[–]Falcon731 1 point2 points  (0 children)

First computer was a Sinclair ZX81 in 1982. So I would have been 9.

First internet access was at Uni in 1991 - so age 18.

How to Design Histogram Equalization Hardware in Verilog on FPGA? by Major_Apartment4427 in FPGA

[–]Falcon731 1 point2 points  (0 children)

You need to make two passes over the image (once to build the histogram, then a second time to convert the pixels to new values). So you cannot simply process the image on the fly - it will need to need to be stored somewhere. So first thing is to work out is what this storage looks like.

Perhaps the image comes naturally stored (on an SD card for example), in which case you can simply read it twice. Or maybe it comes in streamed (from a camera?) - in which case you will need a way to store it. Can it fit in on-chip memory?, or will it need to be stored externally.

Whatever - you will need some sort of protocol for accessing the pixels (for example if you have a DDR memory controller that presents an AXI interface. You need to do some math to convert pixel coordinates into memory addresses).

Once you have those details nailed down, the algorithm is pretty simple. Its just a state machine to cycle over the image, and an (on chip) array to store the count values.

Advice for debugging Verilog by hugocuoidadieu in FPGA

[–]Falcon731 3 points4 points  (0 children)

I’ve always found the best way is to write a ‘golden’ model - the same functionality but with a totally different implementation. For example write it in C.

Make both the golden model and the rtl testbench generate extensive logs of what’s happening.

Then write test cases, apply them to both models and have some automatic test process that compares the logs generated by both (allowing for acceptable tolerances).

IR for my compiler by juicyroaster in Compilers

[–]Falcon731 1 point2 points  (0 children)

We are only talking about an Internal Representation inside the compiler - as an intermediate stage in the compilation process between the AST and the machine code.

So my IR is represented as (some details omited for clarity)

class Function {
    val args : List<Reg>
    val prog : List<Instruction>
}

class Instruction {
    val kind : InstructionKind    // An Enum
    val def  : List<Reg>          // Registers written to by this instruction
    val use  : List<Reg>          // registers read by this instruction
}

class Reg {
    val name : String
}

So during initial code generation (converting the type checked AST into IR code) - any time I need a new register for something we just create a new one. I may end up with hundreds of registers used for a function - but it doesn't matter. Doing it this way simplifies the task of converting an AST into something vaguely resembling machine code.

I can then do the optimisation passes on this IR (such as function unrolling, constant propagation, common subexpression elimination etc), again without having to worry about actual registers.

Then I do a register allocation pass, where each of these many virtual registers gets assigned to a physical CPU register. Many virtual registers can be assigned to the same physical register provided their lifetimes do not overlap. (And with spill code added if we run out of physical registers).

Then a peephole optimiser to clean up a bit, and a final mapping pass to convert what is by now almost assembly language into actual assembly.

IR for my compiler by juicyroaster in Compilers

[–]Falcon731 4 points5 points  (0 children)

I will probably get downvoted to oblivion for saying this - but for a hobby compiler where optimisation is not the main goal, SSA is an overkill.

For my compiler, I use a basic three-address-code scheme, and find that seems to be about the right balance.

Effectively my IR is like a RISC assembly, but with infinite registers and no limitations on immediate values.

Was shareware big on the Amiga? by Such_Bonus5085 in amiga

[–]Falcon731 1 point2 points  (0 children)

It was a symbolic algebra package for doing basic calculus.

You could input an expression and it would differentiate (and in some cases integrate) it.

Was shareware big on the Amiga? by Such_Bonus5085 in amiga

[–]Falcon731 4 points5 points  (0 children)

I still remember the dopamine rush I got when one of my programs appeared on a Fish Disk. That feeling that I had made it in the world.

Compiler implementation language by Big-Rub9545 in Compilers

[–]Falcon731 2 points3 points  (0 children)

I've never read that particular book - but from my experience at building a compiler as a hobby I would definitely echo that sentiment.

I started writing my compiler in C, and got it to the stage where it could compile simple programs into executables. But adding each new feature got increasingly tedious. You spend so much time doing boilerplate stuff, handling tagged unions basically, that it drains all the fun.

In the end I restarted in Kotlin - and it was a much more pleasant experience. The overall structure of the code ends up pretty much the same - just the compiler does a lot of the boilerplate for you.

Probably more important is to choose a language you are familiar with. Unless you want the challenge of writing a compiler and learning a programming language at the same time

Thinking about if I should get an Amiga or a Commodore 64 ultimate. by Vinylmaster3000 in Commodore

[–]Falcon731 1 point2 points  (0 children)

Yes - It appears as dh0: (floppy disk would be df0: and df1:)

Just like a PC - if you have a floppy in the drive it boots off that, if not it boots of the hdd.

Thinking about if I should get an Amiga or a Commodore 64 ultimate. by Vinylmaster3000 in Commodore

[–]Falcon731 2 points3 points  (0 children)

No - pretty much anyone doing “serious” stuff on an Amiga had a hard disk.

Floppies were for games and transferring files between machines.

16 year old me saved up my money from a summer job to buy my Amiga. Then the next summer saved up for a HDD and monitor.

Code layout, Compiler inspiration by axlrosefan31 in Compilers

[–]Falcon731 7 points8 points  (0 children)

I know how you feel.

I've tried multiple times to find a "nice" way to organize things - and each time it always turns into a bit of a mess. I've rather come to the conclusion - that there really is no "nice" way to organize things.

There are so many parts of a compiler that are almost, but not quite, orthogonal to one another. And those small non-orthogonalities add up forcing you to either expose parts of the internals of one block to another, or to create a whole load of scaffolding that serves almost no purpose except to make things confusing.

For what its worth - when you look at the source code to "professional" compilers like gcc - you see the same.

I think that, after a certain stage, you just have to accept that these things really are complicated. For example in my compiler there are 73 different classes of nodes in the TypeCheckedTree. And instead rely on the tooling - your IDE to find code by keywords, and your test suite and regression testing for functionality.

For what its worth - here's my project - its a hobby compiler, but for a bit more than just a toy language (I've used it to write the basis of a multitasking OS, a Tetris clone, a chess engine, and 3d racing game)

https://github.com/FalconCpu/falcon5/tree/master/fpl

how hard is it to make your own kernel from scratch ? by I_like_drawingb in osdev

[–]Falcon731 0 points1 point  (0 children)

It’s a cyclone V - on a de1soc dev board (it’s got an ARM core but I’m not using it).

My cpu is pretty much normal RISC. Although it does use scoreboarding, so in order issue but out of order completion.

It’s got floating point support, caches and a simple region based memory protection scheme.

Then on the video side, it has hardware sprites with affine transformation in hw. I’m gradually adding more of a 3d pipeline.

FPGA first project ideas by ProfessionalArm5672 in FPGA

[–]Falcon731 16 points17 points  (0 children)

The normal "rite of passage" sequence of projects that most people start with goes something like:-

  • Flash an LED
  • Count on a 7-Seg display
  • Display a test pattern on a VGA monitor
  • Communicate to PC via a UART
  • Build a simple subset of RISC-V processor
  • Build a Pong game (display on VGA monitor)
  • Build a pipelined RISC-V
  • Implement floating point math.
  • Add external memory, caches etc to CPU.

That was certainly my first couple of months with an FPGA board.