Skip to content

Attributes

Julian Oppermann edited this page Mar 2, 2021 · 11 revisions

Program counter

[[is_pc]] marks a register as the program counter. Can only occur in the architectural_state section.

unsigned<XLEN> PC [[is_pc]];

Synthesis control

[[do_not_synthesize]] directs a hardware synthesis tool to replace calls to function with this attribute with a user-provided IP core with the same semantics as the function's body. The body can be used for simulation and verification purposes.

functions {
  unsigned<32> fsin(unsigned<32> x) [[do_not_synthesize]] {
    // ... implementation of CORDIC algorithm
  }
}
Clone this wiki locally