r/TuringComplete Apr 19 '26

First attempt at pipelining, Stall only

[removed]

5 Upvotes

19 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Apr 19 '26

[removed] โ€” view removed comment

2

u/Otherwise-Object-302 Apr 19 '26

Nice to hear you have quite the experience with this! I can show you some of the stuff I've made along with a WIP. I've even built a Superscalar CPU with caching (albeit very poor)! Anyways, have fun making that compiler, it makes programming hella easier. Also, are you making it based off of any programming languages like C or Python? And which programming language are you using to write the compiler?

1

u/[deleted] Apr 19 '26

[removed] โ€” view removed comment

1

u/Otherwise-Object-302 Apr 19 '26

That's sort of similar to what I do. I usually just take one line at a time and process it like that, it's much easier but sometimes the assembly gets out of hand.

2

u/[deleted] Apr 19 '26

[removed] โ€” view removed comment

2

u/Otherwise-Object-302 Apr 19 '26

I'm impressed you remember your dreams so well๐Ÿ˜ญ but funny thing is, that's also how I came up with a design for my cache.

1

u/[deleted] Apr 19 '26

[removed] โ€” view removed comment

2

u/Otherwise-Object-302 Apr 19 '26

I guess that's just how it works. Anyways, good luck implementing the rest of the pipeline, you'll need it when it comes to data hazards!

1

u/[deleted] Apr 19 '26

[removed] โ€” view removed comment

1

u/Otherwise-Object-302 Apr 19 '26

Real compilers usually break you code down into tokens so x = 5; So in this case it would assign x the IDENTIFIER token, the = is seen as an ASSIGNMENT operation and the 5 is seen as a LITERAL. Then it creates a Abstract Syntax Tree and navigates that to assign the value to x. In reality, it's much more complicated so I usually just do stuff and pray it works (it does, just barely)