Skip to content

Enhancement of declaration of and usage of always assignments #269

Description

@rob-ng15

It is quite common in Silice to have something like...

uint1   COMMIT = uninitialized;
.
.
.
COMMIT := 0;

Is there any reason why these two lines cannot be combined into say...

uint1   COMMIT := 0;

Similarly, but not as important, to me anyway, as the above, in a unit definition, there are output lines that are always assigned later in the unit, the req_read and req_write in this example. Can they be marked as such in the unit definition?

unit CPU6502(
    input   uint1   TIMER_irq,
    input   uint1   UART_irq,

    output  uint16  out_address,
    output  uint1   out_wrappage,
    output  uint24  out_data,
    input   uint24  in_data,

    output  uint3   req_mask,
    output  uint1   req_read,
    output  uint1   req_write,
    input   uint1   mem_busy,

    input   uint1   RUN,
    input   uint1   RESET,
    input   uint1   DEBUG

as...

unit CPU6502(
    input   uint1   TIMER_irq,
    input   uint1   UART_irq,

    output  uint16  out_address,
    output  uint1   out_wrappage,
    output  uint24  out_data,
    input   uint24  in_data,

    output  uint3   req_mask,
    output  uint1   req_read := 0,
    output  uint1   req_write := 0,
    input   uint1   mem_busy,

    input   uint1   RUN,
    input   uint1   RESET,
    input   uint1   DEBUG

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions