Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Nov 17, 2024

According to https://github.com/riscv-software-src/riscv-unified-db/blob/c55022788590a4601fba3957c2870ca31e0e4157/arch/prose/idl.adoc#compilation-order,

"The order of declaration is important in IDL (like C/C++, unlike Verilog). A variable, constant, or function must be declared before it is used."

@ghost ghost requested a review from dhower-qc as a code owner November 17, 2024 07:59
@dhower-qc
Copy link
Collaborator

Thanks for the detailed look! I need to update the IDL documentation -- the sentence you highlight:

The order of declaration is important in IDL (like C/C++, unlike Verilog). A variable, constant, or function must be declared before it is used.

Is actually not true anymore. I've updated the compiler to load everything in a first pass before going into function bodies, so the syntactic order of functions is no longer important.

Let's keep this PR open, and I'll push the documentation changes in.

@ShashankVM
Copy link
Collaborator

Hi @dhower-qc I'll be closing this one as I deleted my other GitHub account. I'll open a new pull request shortly.

@ShashankVM ShashankVM closed this Nov 21, 2024
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