Closed coreyeng closed 5 years ago
After I typed this up, I realized I mostly made change to the VPI side so I could get some experience with the VPI but, in retrospect, this really should just be a Ruby-side change. The Ruby side can chop up the message and send the multiline token
through.
I'm going to update the PR to do this on the Ruby side...
I suppose I could also update the VPI to support a !k+!
token at the beginning, but the way it is now is only on the Ruby side and won't require and snapshot spins. It'll just be a bug fix for everything OrigenSim 0.15+.
Looks good @coreyeng, is it possible to add something to pattern/test.rb
to send a long message so that we have a test case for this?
Hello,
I've had to put off updating my application to the latest OrigenSim due to some odd issues with hanging simulations and what appeared to be losing STDOUT, which was true, but not for the reasons I originally thought.
With the logging changes between 0.14 and 0.16, using Origen.log(…) now routes through the simulator to keep things in sync, which is great! However, the VPI has a limit of how much input data it can take: 1024 characters to be precise. If you try to send, say 1024 'a's, you'll crash the VPI, stop being able to send/receive stuff from the simulator, but still keep the simulator running. Since I don't really make use of
syncs
and those features (yet), I'd just see my sims got silent after a certain point.I imposed a limit on the size of the logger messages going through the VPI. Its a config option since I'm not sure if the 1024 limit is a Cadence limitation or part of the spec. Other vendors may be more or less. This update support longer messages by splitting them into chunks the VPI can handle and appending a 'multi-part message' token,
!<>!
, to indicate that there's more message incoming. Thestdout reader
was updated to watch for this token. With this change, I'm able to get my long messages through the simulator as before without having to change any other dependencies or manually split them. I didn't notice that thestderr reader
ever gets input from the VPI, so I didn't make any equivalent change there.A few other small changes I needed:
post_process_sim_cmd
that I hadn't used for a while, but started to again to throw insim_args
based on the target/environment options. However, when Origen tries to save the configuration, it can't do so forProcs
and raises an error. So, I just added an exception for this. The save config still works as normal, it just ignores any config settings listed in theNON_DATA_CONFIG_ATTRIBUTES
array. Since these aren't saved in the session's store anyway, the end result is the same.X
the entire time, and since its a ground pin for the IOs, it ends up causing everything to fail. The only way I was able to get my snapshots to work was to disconnect the pin entirely, so I added an option for that duringsim:build
.Pattern.create
to be lost. Since I'm not sure why reloading the target is necessary I added the option to preserve the target.