-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Get ChiselSim working with CIRCT 1.66+ #3890
Conversation
Fix an incorrect assumption in ChiselSim that a 'filelist.f' will exist that includes all modules, _including blackboxes_, in the design. Change this to try to also copy files from the black box filelist. This makes ChiselSim work with CIRCT 1.66 and earlier (which put everything in 'filelist.f') and CIRCT 1.66+ (which does not include blackboxes in 'filelist.f'). Note that this is intended as a temporary solution until FIRRTL has a rock solid ABI that is implemented by CIRCT where all modules can be discovered under an arbitrary public module. See CIRCT changes here: llvm/circt#6729 Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@jackkoenig I'm going to merge this and ask for post-merge review (as this is holding up some other things). |
@seldridge does this work with older version of firtool? Can/should we backport this to 5.x? |
RTFM, yes:
|
// Move a file in a filelist which may not exist. | ||
def maybeMoveFiles(filename: String) = try { | ||
moveFiles(filename) | ||
} catch { | ||
case _ @(_: java.nio.file.NoSuchFileException | _: java.io.FileNotFoundException) => | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to write this as "check if exists, then move if so" but whatever, very Pythonic if you 😉
Fix an incorrect assumption in ChiselSim that a 'filelist.f' will exist that includes all modules, _including blackboxes_, in the design. Change this to try to also copy files from the black box filelist. This makes ChiselSim work with CIRCT 1.66 and earlier (which put everything in 'filelist.f') and CIRCT 1.66+ (which does not include blackboxes in 'filelist.f'). Note that this is intended as a temporary solution until FIRRTL has a rock solid ABI that is implemented by CIRCT where all modules can be discovered under an arbitrary public module. See CIRCT changes here: llvm/circt#6729 Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 9448d32)
Fix an incorrect assumption in ChiselSim that a 'filelist.f' will exist that includes all modules, _including blackboxes_, in the design. Change this to try to also copy files from the black box filelist. This makes ChiselSim work with CIRCT 1.66 and earlier (which put everything in 'filelist.f') and CIRCT 1.66+ (which does not include blackboxes in 'filelist.f'). Note that this is intended as a temporary solution until FIRRTL has a rock solid ABI that is implemented by CIRCT where all modules can be discovered under an arbitrary public module. See CIRCT changes here: llvm/circt#6729 Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 9448d32)
I tested it with 1.66.0 and assumed that was enough to setup the inductive proof... (Empirically this works on 1.66 as this passed CI and works on the 1.67 candidate as it passed nightly after I manually ran it.) This may, however, be working because of the aggressive exception hiding in tl;dr: empirically this should be safe to backport. The exception catching logic may be a little jank. |
If we need to tweak it on 5.x or 6.x that's fine, thanks for getting the fix in! We can tweak the exception logic later, nbd. |
Fix an incorrect assumption in ChiselSim that a 'filelist.f' will exist that includes all modules, _including blackboxes_, in the design. Change this to try to also copy files from the black box filelist. This makes ChiselSim work with CIRCT 1.66 and earlier (which put everything in 'filelist.f') and CIRCT 1.66+ (which does not include blackboxes in 'filelist.f'). Note that this is intended as a temporary solution until FIRRTL has a rock solid ABI that is implemented by CIRCT where all modules can be discovered under an arbitrary public module. See CIRCT changes here: llvm/circt#6729 Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 9448d32) Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Fix an incorrect assumption in ChiselSim that a 'filelist.f' will exist that includes all modules, _including blackboxes_, in the design. Change this to try to also copy files from the black box filelist. This makes ChiselSim work with CIRCT 1.66 and earlier (which put everything in 'filelist.f') and CIRCT 1.66+ (which does not include blackboxes in 'filelist.f'). Note that this is intended as a temporary solution until FIRRTL has a rock solid ABI that is implemented by CIRCT where all modules can be discovered under an arbitrary public module. See CIRCT changes here: llvm/circt#6729 Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 9448d32) Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Fix an incorrect assumption in ChiselSim that a 'filelist.f' will exist that includes all modules, including blackboxes, in the design. Change this to try to also copy files from the black box filelist. This makes ChiselSim work with CIRCT 1.66 and earlier (which put everything in 'filelist.f') and CIRCT 1.66+ (which does not include blackboxes in 'filelist.f').
Note that this is intended as a temporary solution until FIRRTL has a rock solid ABI that is implemented by CIRCT where all modules can be discovered under an arbitrary public module.
See CIRCT changes here: llvm/circt#6729
This fixes the nightly failure seen here: https://github.com/chipsalliance/chisel/actions/runs/8110395678
Release Notes
Change ChiselSim to also move blackboxes as indicated by the default black box filelist. This fixes issues with ChiselSim and CIRCT 1.67.0 introduced in (llvm/circt#6729). This is a backwards compatible change that has no effect on earlier versions of CIRCT.