tpb has quit [Remote host closed the connection]
tpb has joined #symbiflow
smkz has joined #symbiflow
<HackerFoo> I wish we had used capnproto for FASM.
<litghost> One of the design goals for FASM was a line oriented text format
<litghost> So capnproto doesn't really line up there
<HackerFoo> It is fun learning ANTLR, though. It seems nicer than yacc/bison.
<HackerFoo> I think supporting arbitrary width numbers with different formats is the biggest problem.
<HackerFoo> It should be FEATURE OFFSET HEX_VALUE
<HackerFoo> With at most 32-bit values.
<litghost> You are wrong?
<litghost> Almost all modern LUT inits are 64 bits?
<litghost> And BRAM inits are 256 bits?
<HackerFoo> Then it would be:
<litghost> Like you are design a format that doesn't line up with the underlying requirements to express the hardware succulently
<HackerFoo> LUT 0 lower
<HackerFoo> LUT 32 upper
<HackerFoo> 64 bits would be fine I guess. All modern CPUs are 64 bits.
<HackerFoo> But >64 bits is annoying. There are long longs, but that only goes up to 128 bits.
<HackerFoo> And we use 256 bit vectors for BRAM.
<litghost> Why are you messing with integer types at all?
<litghost> Just use bit vectors for everything?
<litghost> bool[] or u8[] is likely fine at the boundry
<HackerFoo> I use fixed arrays of words, because it's faster, but single words would be easier to work with in most languages.
<litghost> Fixed array?
<litghost> You mean fixed length?
<litghost> Also, if you are having trouble on the C++ <-> Python boundry, shouldn't https://docs.python.org/3/c-api/long.html#c.PyLong_FromString work?
<litghost> Which should be directly invokable once you have parsed the verilog prefix (e.g. "64'b" or "256'h")
<HackerFoo> Yeah.
<tpb> Title: Integer Objects Python 3.9.1rc1 documentation (at docs.python.org)
<litghost> Your implementation strategy is very fragile. Why not use std::vector (or absl::InlinedVector) to implement a dynamic bitvector
<HackerFoo> Thanks. I'm working on a C++ visitor that generates a string of tag/length/hex values right now, which should be about as fast as possible to marshal into Python.
<litghost> absl::InlinedVector allows for lightweight small vectors below a certain size, and spill into allocation automatically
<HackerFoo> I think it would still be a lot of allocations.
<HackerFoo> It's easy enough to bump up the word width and recompile if needed.
<litghost> By definition, replacing std::array with absl::InlinedVector will result in the same number of allocations, and doesn't explode if the input exceeds your size limits
<HackerFoo> std::array doesn't have to be heap allocated.
<litghost> Neither does absl::InlinedVector if the allocation is less than the template parameter?
<litghost> Do not bake in exploding size limits to modern C++ code. There are light-weight ways to trade compile time static allocation and dynamic allocation
<HackerFoo> I prefer to hit some limit (and know about it) that have my machine slowly die.
<HackerFoo> *than
<litghost> Sure, but 64 bytes (or 101 bytes) is not that limit
<litghost> 10e7 as a limit, sure! Anything less than 64kB, no way
<litghost> As a concrete example, tcmalloc will generate warnings on allocations large than 1 GB I believe?
<tpb> Title: memory - is tcmalloc: large alloc a warning or error in Python - Stack Overflow (at stackoverflow.com)
<HackerFoo> Also, InlinedVector is 845 lines. My implementation with helper functions and a test is ~40 lines, and I know what to expect from it.
<HackerFoo> Not saying it's better, just that there are tradeoffs.
<litghost> So? std::array is 400 lines, std::vector is 2k? We move useful constructs behind interfaces and test them
<litghost> If you want the advantages of small static arrays without exploding when the size exceeds them, that is what absl::InlineVector (et all) is for
<HackerFoo> You can't have all the advantages, though. For example, there must be a check to see if the static array size is exceeded.
<HackerFoo> Maybe this could be disabled with a macro, because you'd need assertions on the fixed width code anyway.
<litghost> I doubt that it matters that much. Without data, I'd lean to the robust solution before further optimization
<bjorkintosh> so, is there yet a batteries included kit one can get started with?
Degi_ has joined #symbiflow
Degi has quit [Ping timeout: 256 seconds]
Degi_ is now known as Degi
<HackerFoo> Or, if you're not opposed to Nix: https://github.com/SymbiFlow/nix-symbiflow
<bjorkintosh> multics forever! down with eunuchs!!!
<HackerFoo> I mean the package manager: https://nixos.org/
<tpb> Title: NixOS - NixOS Linux (at nixos.org)
<bjorkintosh> oh. nixos. the other guix
<bjorkintosh> (or is it the other way around)
<bjorkintosh> HackerFoo, do you use the quicklogic or some other hardware?
citypw has joined #symbiflow
<mithro> litghost / HackerFoo: I just found https://github.com/conda-incubator/conda-lock
<mithro> umarcor: "Create minimal docker images from conda environments"
<umarcor> @mithro: I'll have a llok
<mithro> I also just discovered that anaconda has build badges -> https://anaconda.org/anaconda/constructor/badges
<umarcor> Is that different from the Conda shields in http://shields.io/ ?
<tpb> Title: Shields.io: Quality metadata badges for open source projects (at shields.io)
<mithro> umarcor: Dunno....
<umarcor> I prefer using shields.io if possible, because it allows customisation and homogeneity.
<tpb> Title: Open Software Packaging for Science | by QuantStack | Medium (at medium.com)
<HackerFoo> bjorkintosh: I have various Xilinx Artix 7 boards, but I haven't used them much.
<HackerFoo> I have one of these, which I'm most interested in: https://www.crowdsupply.com/rhs-research/nitefury
<tpb> Title: NiteFury | Crowd Supply (at www.crowdsupply.com)
<HackerFoo> Maybe I should do a proper release of nix-symbiflow once we have Litex in symbiflow-examples. I could probably even upsteam it to nixpkgs, then NixOS would have support in the next release.
<HackerFoo> I wonder if that might put too much load on hydra.nixos.org. Probably not, though.
<HackerFoo> hydra.vtr.tools might be bigger that their cluster.
<HackerFoo> *than
<umarcor> @mithro: I had a look at conda-docker, and I didn't find much special about it. It seems to be a Python library for using docker images as tarballs. So, it can add and remove layers/content, but I'd say it cannot do anything which requires actually executing something.
<umarcor> It doesn't seem to have features for squashing specific layers or for merging layers from different images, which would be useful.
az0re has quit [Remote host closed the connection]
<umarcor> Therefore, I only find it useful for users that want to package Python only projects and which cannot use docker/podman.
az0re has joined #symbiflow
<_whitenotifier-f> [sv-tests] caryr opened issue #1186: Many tests from ivtest can now be removed from the blacklist. - https://git.io/JITj4
kgugala_ has joined #symbiflow
kgugala has quit [Ping timeout: 246 seconds]
kgugala has joined #symbiflow
kgugala_ has quit [Read error: Connection reset by peer]
awordnot has quit [Ping timeout: 265 seconds]
awordnot has joined #symbiflow
join_subline has quit [Ping timeout: 240 seconds]
join_subline has joined #symbiflow
mkru has joined #symbiflow
<_whitenotifier-f> [symbiflow-arch-defs] acomodi opened issue #1829: CI on master does not run properly - https://git.io/JIkng
xtro has quit [Ping timeout: 256 seconds]
<_whitenotifier-f> [yosys-symbiflow-plugins] tmichalak opened issue #59: Remove workaround with skipping clocks on dangling wires - https://git.io/JIk9C
kgugala has quit [Quit: -a- Connection Timed Out]
kgugala has joined #symbiflow
mkru has quit [Quit: Leaving]
mkru has joined #symbiflow
join_subline has quit [Ping timeout: 246 seconds]
join_subline has joined #symbiflow
mkru has quit [Quit: Leaving]
maartenBE has quit [Ping timeout: 256 seconds]
maartenBE has joined #symbiflow
mkru has joined #symbiflow
mkru has quit [Quit: Leaving]
<mithro> @umarcor I only read the description and didn't actually look at the code
citypw has quit [Ping timeout: 240 seconds]
xtro has joined #symbiflow
titanbiscuit has joined #symbiflow
<mithro> @umarcor Do you know anything about maintaining github actions externally from the using repo. I just figured out we should probably be doing that for our Python packages.
<mithro> @umarcor https://github.com/SymbiFlow/python-symbiflow-v2x/blob/master/.github/workflows/ci.yml#L6-L13 is would be super nice if that job was shared between multiple different packages like python-symbiflow-v2x, vtr-xml-utils, etc
<HackerFoo> I sped up the FASM parser ~30x, and it passes tests. Now to package it.
<litghost> Sweet