<DiffieHellman>
This may be the wrong place, but here I go anyway. I'm trying to do UART loopback (i.e. type in GNU screen and the character is displayed). I'm using 9600 baud and no parity bit. I did get it working, but garbage output for some characters is returned if I type fast. For the rx/tx input/output loop, I used 19200Hz, but different clock rates have all the same issues. I also tried making a FIFO
<DiffieHellman>
buffer, but I get the same thing. Any suggestions?
<sorear>
insufficient stop bits?
<tnt>
huh ... what uart core are you using ?
<DiffieHellman>
I just used 1 stop bit, but I guess I could make it 2. tx should just work as tx only, works fine at high speeds with 0 errors, but I guess it isn't.
<DiffieHellman>
tnt: I'm not using an UART core, just some magic I wrote up myself.
<tnt>
"some magic" ? I'm not sure what you expect as answer ... without seeing the logic, the most insight I can provide is "your code is buggy" ...
<DiffieHellman>
I'll upload it to my git so you can see it I guess.
<tnt>
did you simulate it ?
<DiffieHellman>
Simulation is no fun, I always just go straight to hardware. I made the previous version pass a linter and that's about it.
<tnt>
ok, well I'll leave you have fun then.
<tnt>
wouldn't want to spoil it.
<tnt>
whitequark: I'm a bit lost in the templates when trying to implement the blackbox. Do you see anything wrong with :
<tnt>
(I mean, it doesn't build so it's obviously wrong, but the error "error: use 'template' keyword to treat 'get' as a dependent template name" means nothing to me)
<tnt>
For the "posedge" detection thing to work, the eval should be between after the p_clk assignement and the "input" assignements.
<whitequark>
in zero physical time
<whitequark>
okay, that's... yeah, that's a non-trivial problem
<tnt>
Ok, that's unfortunate. I worked around it for now by "sampling" (i.e. doing the get()) on negative edge, and then using that value when doing the lookup and set() on the positive edge. Not ideal but will have to do for now.
<whitequark>
yes, that works
<whitequark>
once I have the redesign of the scheduler finished, it will work properly