sylefeb / Silice

Silice is an easy-to-learn, powerful hardware description language, that simplifies designing hardware algorithms with parallelism and pipelines.
Other
1.3k stars 78 forks source link

Enhancement Request: Import 16 bit binary files #210

Closed rob-ng15 closed 2 years ago

rob-ng15 commented 2 years ago

When including a file that is 16 bit it has to be included as:

// RISC-V FAST BRAM and BIOS
bram uint16 ram[16384] = {
    $include('ROM/BIOS.inc')
    , pad(uninitialized)
};

with 16bit hex entries.

Binary imports are allowed for 8 bit and 32 bit, can't remember the mechanism off the top of my head, but is it possible to extend this to 16 bit?

sylefeb commented 2 years ago

Hi Rob, this is a good point, I'll look into it! Syntax to load: https://github.com/sylefeb/Silice/blob/67e99e3f9b7fa0f4924da729ba222d95ed574cec/learn-silice/Documentation.md?plain=1#L219-L223

rob-ng15 commented 2 years ago

It'll just make things easier for me, I can just point directly to the compiled BIOS libraries, rather than have to convert them.

On Sat, 26 Feb 2022 at 10:49, sylefeb @.***> wrote:

Hi Rob, this is a good point, I'll look into it! Syntax to load: https://github.com/sylefeb/Silice/blob/67e99e3f9b7fa0f4924da729ba222d95ed574cec/learn-silice/Documentation.md?plain=1#L219-L223

— Reply to this email directly, view it on GitHub https://github.com/sylefeb/Silice/issues/210#issuecomment-1051994672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4SYTZNER6Z3GIDM6TEEVDU5CV2HANCNFSM5PMMR64Q . You are receiving this because you authored the thread.Message ID: @.***>

sylefeb commented 2 years ago

Hi Rob, from the source code I just realized uint16/int16 are already supported! Sorry I forgot to document it, fixing.

rob-ng15 commented 2 years ago

Closing as working. Thank you.