Skip to content

WIP: Merges for documentation and to support LIFCL 33/33U#49

Open
jdavidberger wants to merge 30 commits intogatecat:mainfrom
jdavidberger:master
Open

WIP: Merges for documentation and to support LIFCL 33/33U#49
jdavidberger wants to merge 30 commits intogatecat:mainfrom
jdavidberger:master

Conversation

@jdavidberger
Copy link

The changes here are related to:

  • Updated documentation
  • Support for adding new platform types in general
  • Support for platforms LIFCL 33/33U
  • Somewhat faster fuzzing -- mostly by cacheing more things

@jdavidberger jdavidberger changed the title Merges for documentation and to support LIFCL 33/33U WIP: Merges for documentation and to support LIFCL 33/33U Jan 28, 2026
This serves as a master listing of each device and metadata associated with that device:

- packages: Comes from various lattice documentation, can also be seen by looking at the radiant device selection dialog.
- frame metadata: There are various necessary peices of data here. All are available in the "sysCONFIG Guide for Nexus Platform" document from the lattice website.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be nice to expand this a bit more?


cfg = FuzzConfig(job="PLCROUTE", device="LIFCL-40", sv="../shared/route_40.v", tiles=["R16C22:PLC"])
def run_cfg(device):
tile = list(tiles.get_tiles_by_tiletype(device, "PLC").keys())[0]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was a degree of caution not to pick a tile too close to the edge of the device because that could falsely cause some extra edge routing to be included, have you checked this?

"PIOA.SEIO18.BASE_TYPE" => vec![Bel::make_seio18(0)],
"PIOB.SEIO18.BASE_TYPE" => vec![Bel::make_seio18(1)],
"PIOA.DIFFIO18.BASE_TYPE" => vec![Bel::make_diffio18()],
"PIOB.DIFFIO18.BASE_TYPE" => vec![Bel::make_diffio18()],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think PIOB.DIFFIO18 should ever happen?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so either, will remove

if in_metadata && self.check_preamble(&COMMENT_END) {
if curr_meta.len() > 0 {
self.metadata.push(curr_meta.to_string());
if curr_meta.is_ascii() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like spaces and tabs got mixed here?

PinSetting(name="ENCLKOS4", dir="in", desc="Enable E output (CLKOS4). Active high. PLL CIB input.", bits=None),
PinSetting(name="ENCLKOS5", dir="in", desc="Enable F output (CLKOS5). Active high. PLL CIB input.", bits=None),
PinSetting(name="FBKCK", dir="in", desc="", bits=None),
PinSetting(name="LEGACY", dir="in", desc="PLL legacy mode signal. Active high to enter the mode. Enabled by lmmi_legacy fuse. PLL CIB input.", bits=None),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't scrape descriptions from the lattice html unfortunately. It creates a theoretical copyright issue (as this is text rather than just a raw fact about an FPGA) particularly when they often reference weird lattice internal things, even if they're public facing docs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the ones from the primitives.py file, but made it so definitions that get scraped in from the web docs have the lattice descriptions. Not sure if this is good enough or not; easy enough to keep them out altogether if needed though

@jdavidberger
Copy link
Author

I increased the scope by a decent margin; I added overlays and a general purpose pip solver. Probably the big thing now is making sure the overlays / 000 fuzzer make sense and are documented well enough.

Copy link
Owner

@gatecat gatecat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general looking good, had another glance at this with a few more comments. let me know if anything else is waiting on me!


### iptypes

These files are generated by various fuzzers associated with the given primitive. They map out the relationship between configuration parameters and the bits set in the bitstream.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a note that these specifically relate to configuration in the "IP space" (baseaddrs.json) rather than the main CRAM grid?

return list(configs.values())

configs = create_device_configs("LIFCL-33") + create_device_configs("LIFCL-33U") + create_device_configs("LIFCL-17") + create_device_configs("LIFCL-40")
# [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably just remove this - it will always be in the git history if it needs fishing out again

lambda x: dict(arcs_attr=arcs_attr) if x == "YES" else {}, False)
lambda x: dict(arcs_attr=arcs_attr) if x == "YES" else {}, False, executor=executor)

# CIBMUXIN -> CIBMUXOUT
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was there a specific reason for removing this?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably instead of moving to unused/ just get rid of this? again it will be around in the git history if needed

println!("done");
debug!("done");
}
LSC_READ_DR_UES => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

purely out of interest, when is radiant including this command in a bitstream?

pub always_on: BTreeSet<ConfigBit>,
#[serde(default)]

// Tiletype and relative offset for the tiles that this tiletype configures -- that is, changes in
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this comment is quite correct - it seems to just be a relative offset and not a tiletype?


tiles_at_rc = get_owning_tiles_for_rc(rc)

tileless_rcs = set(["R37C52_H01E0100", "R73C160_JIVREFI4_IVREF_CORE"])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this should be gated on LIFCL-33[U]? R37C52_H01E0100 could plausibly exist in other devices too and not be weird I think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants