<cr1901_modern>
you can always set synth_opts directly
<cr1901_modern>
so adding synth_opts just feels like an extra step as opposed to modifying the template
balrog has quit [Quit: Bye]
balrog has joined #m-labs
balrog has quit [Ping timeout: 268 seconds]
balrog has joined #m-labs
rohitksingh_work has joined #m-labs
rohitksingh_wor1 has joined #m-labs
rohitksingh_work has quit [Ping timeout: 244 seconds]
futarisIRCcloud has joined #m-labs
rohitksingh_work has joined #m-labs
rohitksingh_wor1 has quit [Ping timeout: 250 seconds]
<rjo>
sb0: i have a few more bits pending. some groundwork has already landed. give me until sunday to commit a couple things. then we can divide up the rest.
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
rohitksingh_work has quit [Read error: Connection reset by peer]
key2 has joined #m-labs
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 250 seconds]
m4ssi has joined #m-labs
<sb0>
whitequark: what do you think of adding stack overflow detection to mor1kx/misoc/rust/artiq firmware?
<sb0>
you can still trash memory right now by putting a large buffer on the stack ...
<whitequark>
sb0: we were supposed to do that
<whitequark>
you even made a guard page module
<whitequark>
the problem is that mor1k does not trap on reads
<whitequark>
i.e. it just ignores bus error on reads
<whitequark>
I think I even have a branch with stack overflow detection somewhere... the problem is that it didn't really work well
<whitequark>
because of that mor1k issue, that is
rohitksingh has joined #m-labs
<GitHub-m-labs>
[artiq] tballance commented on issue #1205: This sounds like a simple feature but would help with usability. From my point of view it would be nice for experiment code to be able to seamlessly use Urukul or SUServo. https://github.com/m-labs/artiq/issues/1205#issuecomment-444927749
<sb0>
whitequark: can't there be a designated stack pointer register in the CPU, with an exception raised if it goes outside certain boundaries?
<sb0>
raised in hardware that is
<whitequark>
sb0: in principle, yes, but do we want to run a fork of mor1kx?
<whitequark>
there is already a designated stack pointer register...
<whitequark>
R1 I think?
<whitequark>
LLVM (and so Rust) always assume that R1 has a sane value, and rely on it, and preserve this invariant
<whitequark>
so it would be possible to add some logic that raises an exception if R1 goes out of range
<whitequark>
I'm not sure if I want to hack this into mor1kx though, it has a lot of pretty gross Verilog and such
<whitequark>
also not sure about timing
<sb0>
regarding timing, you can probably pipeline it
<whitequark>
so the register file stays in BRAM (it's in BRAM now, right?) and there is a comparator that extracts R1 accesses specifically?
<sb0>
yeah, that's an option. i don't know if it's in BRAM.
<sb0>
you can probably shave some bits from the comparator and improve timing/area by imposing that the stack limits should be some powers of 2
<sb0>
*aligned to some powers...
<whitequark>
so it would be a compile time parameter?
<sb0>
yes
<whitequark>
that works
rohitksingh has quit [Ping timeout: 250 seconds]
m4ssi has quit [Remote host closed the connection]
mumptai has joined #m-labs
mumptai has quit [Read error: Connection reset by peer]