ChanServ changed the topic of #prjunnamed to: FPGA toolchain project · rule #0 of prjunnamed: no one should ever burn out building software · https://github.com/prjunnamed/prjunnamed · logs: https://libera.irclog.whitequark.org/prjunnamed
<Wanda[cis]> <gatecat[m]> "literally corners? ;)" <- oh hey did you know there's dedicated routing from the SPI/I2C IP to particular pre-assigned IOs? the "ENABLE" bits icestorm mentions for them are actually the bits the disable the dedicated paths and switch to fabric routing
<Wanda[cis]> s/the/that/
h_ro has joined #prjunnamed
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 4 commits to main [+1/-0/±21] https://github.com/prjunnamed/prjunnamed/compare/d4867da2e894...4120f2872ea5
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 9a72a33 - Add `debug` cell and unname pass.
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark bd5716d - netlist: display associated names (if any) for cells with 1-wide output.
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 7d7adb5 - netlist: implement comments.
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 4120f28 - netlist: simplify cell parameter syntax.
<whitequark[cis]> prjunnamed now has an unname pass.
<mei[m]> so what's the difference between Name and Debug?
<Wanda[cis]> Name keeps the value alive; Debug does not
<Wanda[cis]> if some value is only used by Debug, it's going to be removed and the Debug input will be replaced by X
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 1 commit to main [+0/-0/±6] https://github.com/prjunnamed/prjunnamed/compare/4120f2872ea5...bde5283323d4
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark bde5283 - netlist: make instance and target cell syntax more readable.
<_whitenotifier-4> [prjunnamed/vscode-syntax] whitequark pushed 2 commits to main [+0/-0/±2] https://github.com/prjunnamed/vscode-syntax/compare/d56f1f11d8cf...f659d08ddd17
<_whitenotifier-4> [prjunnamed/vscode-syntax] whitequark b68185b - Fix highlighting for IO ports.
<_whitenotifier-4> [prjunnamed/vscode-syntax] whitequark f659d08 - Add keywords for the new instance and target syntax.
<_whitenotifier-4> [prjunnamed/vscode-syntax] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/prjunnamed/vscode-syntax/compare/f659d08ddd17...56dfe4b92451
<_whitenotifier-4> [prjunnamed/vscode-syntax] whitequark 56dfe4b - Add keywords for the new instance and target cell syntax.
<_whitenotifier-4> [prjunnamed/vscode-syntax] whitequark pushed 1 commit to main [+0/-0/±2] https://github.com/prjunnamed/vscode-syntax/compare/56dfe4b92451...4a378f3ae1d8
<_whitenotifier-4> [prjunnamed/vscode-syntax] whitequark 4a378f3 - Add keywords for the new instance and target cell syntax.
<_whitenotifier-4> [prjunnamed/vscode-syntax] whitequark tagged 4a378f3 as v0.2.4 https://github.com/prjunnamed/vscode-syntax/commit/4a378f3ae1d88a6dbedddb371ae451df92a34e2b
<_whitenotifier-4> [vscode-syntax] whitequark created tag v0.2.4 - https://github.com/prjunnamed/vscode-syntax
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/prjunnamed/prjunnamed/compare/bde5283323d4...50230b14172c
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 50230b1 - netlist: process `debug` cells like `name` cells in `iter_cells_topo`.
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 1 commit to main [+0/-0/±5] https://github.com/prjunnamed/prjunnamed/compare/50230b14172c...3002e95dd424
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 3002e95 - Replace `Pat(_, _)` with shorter `Pat(..)`. NFC
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 1 commit to main [+0/-2/±0] https://github.com/prjunnamed/prjunnamed/compare/3002e95dd424...8a6ad0859bcc
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 8a6ad08 - Remove examples folder.
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 1 commit to main [+1/-1/±3] https://github.com/prjunnamed/prjunnamed/compare/8a6ad0859bcc...53f24f64753c
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 53f24f6 - generic: rename lower pass to lower_arith. NFC
<_whitenotifier-4> [prjunnamed/amaranth] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/prjunnamed/amaranth/compare/c54a41015aac...c3b62c329a99
<_whitenotifier-4> [prjunnamed/amaranth] whitequark c3b62c3 - back.unnamed: update syntax.
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/prjunnamed/prjunnamed/compare/53f24f64753c...4fb001703fe7
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 4fb0017 - cli: allow a flow reading Yosys JSON and writing Unnamed IR.
mupuf has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mupuf-soju has quit [Remote host closed the connection]
mupuf has joined #prjunnamed
h_ro has quit [Ping timeout: 272 seconds]
sajattack[m]1 has joined #prjunnamed
<sajattack[m]1> Dumb question but when a parent module defines a verilog parameter for a child module and they're in different source files how do I tell yosys the child module's parameter isn't undefined
<whitequark[cis]> wrong channel?
<sajattack[m]1> I guess. Just looking for people with experience using yosys and didn't get an answer on 1b2 and afaik prjunnamed uses yosys' json format or something
_whitelogger has quit [Ping timeout: 260 seconds]
_whitelogger_ has joined #prjunnamed
micko has joined #prjunnamed
jn has quit [Remote host closed the connection]
jn has joined #prjunnamed
jn has quit [Remote host closed the connection]
jn has joined #prjunnamed
jn has quit [Ping timeout: 252 seconds]
jn has joined #prjunnamed
jn has joined #prjunnamed
jn has quit [Ping timeout: 260 seconds]
micko has quit [Quit: Client closed]
micko has joined #prjunnamed
micko has quit [Ping timeout: 240 seconds]
leocassarani[m] has quit [Quit: Idle timeout reached: 172800s]
jn has joined #prjunnamed
jn has joined #prjunnamed
Guest86 has joined #prjunnamed
Guest86 has quit [Client Quit]
LeoC has joined #prjunnamed
LeoC is now known as leo_cassarani
leo_cassarani has quit [Client Quit]
<mei[m]> in documentation, how do I concisely distinguish between the mode of synthesis with and without a target specified (context: "Name cells will be removed anyway if you specify a target")
<mei[m]> I guess I could say just that, but having a proper name for this would probably elucidate why that is the case
<whitequark[cis]> "target-independent" and "target-dependent"?
<mei[m]> currently target-dependent also implies that out the other way comes a bitstream, right?
<whitequark[cis]> i... don't think so?
<whitequark[cis]> it just means that it depends on knowing the taret
<whitequark[cis]> s/taret/target/
<whitequark[cis]> like, on the face of it that's what the term says
<mei[m]> ah, i see. i made an unfounded logical leap. so the fact that target-dependent synthesis kills Name cells is kind of... random? or, rather, it tries to approximate some other condition?
<whitequark[cis]> it doesn't actually kill them any more
<whitequark[cis]> well, it transforms them into Debug cells
<whitequark[cis]> but yes, I should go into more detail on this
<Wanda[cis]> (note that it's unclear there's any use for synthesis without a target other than testing; we may want to expose it only under a test subcommand in the future, sort of like LLVM's opt)
<whitequark[cis]> we do not make an apriori assumption of what the netlist is going to be used for when reading the netlist. possible options include "synthesis for siliconblue", "synthesis for [redacted]", or "cxxrtl"
<Wanda[cis]> (there is use for doing other things without a target, though, such as simulation or Verilog output)
<whitequark[cis]> synthesis for an FPGA only requires computing the values of primary outputs (output cells). optimization for cxxrtl requires computing the values of all named nets
<whitequark[cis]> * synthesis for an FPGA only requires computing the values of primary outputs (output cells). optimization for cxxrtl requires computing the values of all named nets (output but also name cells)
<whitequark[cis]> synthesis also benefits from (nextpnr shows you slightly more legible timing reports) retaining the names of intermediate nets, but dropping them is preferred to computing them without need (since it conserves resources)
<whitequark[cis]> so instead of adding a parameter to Design::from_str (or the frontend or Yosys JSON import or whatever) we use the unname pass
<whitequark[cis]> in general i dislike having "contexts", "global settings", and the like when the same things could be achieved by a transformation in a single place
<whitequark[cis]> "composition over configuration" if you will
<whitequark[cis]> there's this cute choice of even having impl FromStr for Design which constraints it to "it is absolutely impossible to pass any configuration parameters to the primary entry point to the parser" (yes, we do have crate::parse also, but.)
<whitequark[cis]> * there's this cute choice of even having impl FromStr for Design which constraints it to "it is absolutely impossible to pass any configuration parameters to the primary entry point to the parser" (yes, we do have crate::parse also, but. it's mostly for testing anyway)
<whitequark[cis]> and i think this choice is actually useful in that it prevents a Context struct from existing
<whitequark[cis]> <sajattack[m]1> "I guess. Just looking for people..." <- see #yosys:matrix.org
<Wanda[cis]> am housecat.
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/prjunnamed/prjunnamed/compare/4fb001703fe7...1ec4ebb67874
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark 1ec4ebb - yosys_json: don't declare netnames for cells with no output.
<mei[m]> Wanda[cis]: *finally* some on-topic discussion, and not that yosys bullshit
<mei[m]> btw, i was playing around with cargo-deny and it pointed me to this: https://rustsec.org/advisories/RUSTSEC-2022-0081
<mei[m]> tl;dr: json is unmaintained, unresolved soundness issue, there's apparently a maintained fork called jzon, among other listed alternatives
<whitequark[cis]> we can switch to jzon i think
<whitequark[cis]> i'm not married to json/jzon, it was just something to get the project started
<mei[m]> i'll look into it later. jzon and simd_json would probably be the major contenders
<mei[m]> currently stuck because i want to link to the unname pass in the docs for the Name cell and uh
<whitequark[cis]> huh.
<whitequark[cis]> why
<whitequark[cis]> oh, it's because you're linking to a dependent
<whitequark[cis]> it needs the TeX solution of just repeatedly processing the files until you resolve all references
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/prjunnamed/prjunnamed/compare/1ec4ebb67874...d87d1828ba6b
<_whitenotifier-4> [prjunnamed/prjunnamed] whitequark d87d182 - cli: refactor input/output code.
<mei[m]> <whitequark[cis]> "why" <- i guess i can add a dev-dependency?
<Wanda[cis]> oh, those can be circular?
<whitequark[cis]> that's cursed
<whitequark[cis]> are there uh. doc-dependencies
<mei[m]> mei[m]: ah, this doesn't work. great
<mei[m]> okay, fuck it, retro-style link it is
<_whitenotifier-4> [prjunnamed] meithecatte synchronize pull request #3: Add doc comments explaining some aspects of the IR - https://github.com/prjunnamed/prjunnamed/pull/3
<_whitenotifier-4> [prjunnamed] meithecatte synchronize pull request #3: Add doc comments explaining some aspects of the IR - https://github.com/prjunnamed/prjunnamed/pull/3
<_whitenotifier-4> [prjunnamed] meithecatte commented on pull request #3: Add doc comments explaining some aspects of the IR - https://github.com/prjunnamed/prjunnamed/pull/3#issuecomment-2655064132
<whitequark[cis]> so looking closer at this doc, i feel like there's two things that are in tension
<whitequark[cis]> there is explaining what something is (reference documentation), which is what i think should go into the doc comments; it is the source of truth for the netlist semantics as it is encoded
<whitequark[cis]> and then there is explaining what something is used for (guide documentation), which is what should go into our equivalent of LangRef.html
<whitequark[cis]> basically, someone writing a frontend (plausibly in a different language) should not be expected to dig in the depths of rustdoc
<whitequark[cis]> also the netlist crate is intentionally decoupled from the uses of the netlist, such as synthesis, so i guess rust not allowing links into a dependent crate is kind of just reflecting that reality here
<whitequark[cis]> i do think it is worth thinking about starting a langref.md; i am currently making some updates that will bring the text netlist format closer to its final form
<whitequark[cis]> i propose that once i finish that i create an mdbook under docs/ or book/ or something and we put the guide-level information there
<whitequark[cis]> whereas the crate will only describe the validity invariants and other such technical info
<whitequark[cis]> * the crate docs will only
<whitequark[cis]> or to summarize in a few words: i think the netlist crate docs is not the right place for explaining how synthesis/simulation flows work in general
<mei[m]> yeah, feel free to migrate the documentation to whereever, i merely started with rustdoc because that didn't involve making a tooling choice or setup friction
<_whitenotifier-4> [prjunnamed] wanda-phi closed pull request #3: Add doc comments explaining some aspects of the IR - https://github.com/prjunnamed/prjunnamed/pull/3
<_whitenotifier-4> [prjunnamed/prjunnamed] wanda-phi pushed 7 commits to main [+0/-0/±12] https://github.com/prjunnamed/prjunnamed/compare/d87d1828ba6b...179b3f006761
<_whitenotifier-4> [prjunnamed/prjunnamed] meithecatte cf55e5a - netlist: Add some documentation describing the IR
<_whitenotifier-4> [prjunnamed/prjunnamed] meithecatte 76eeddc - adc_split: clarify where the constant-folding happens
<_whitenotifier-4> [prjunnamed/prjunnamed] meithecatte 764c140 - simplify: promote large markdown comments to doc-comments
<_whitenotifier-4> [prjunnamed/prjunnamed] ... and 4 more commits.
<whitequark[cis]> oh, also we do not have "wires". yosys has wires. we have none of them
leocassarani[m] has joined #prjunnamed
<leocassarani[m]> prjunwired