Skip to content

Integrate SPI device #242

Closed
Closed

Description

@raylau1
No description provided.

Activity

  1. self-assigned this
    on Jan 12, 2026
  2. raylau1 commented on Jan 12, 2026

    @raylau1
    ContributorAuthor

    Using a base address of 0x43000000 and size of 0x00001FC0 for the SPI device causes the tilelink xbar to use numeric comparison rather than masking to determine device select for SPI device, but the auto-generated tl_peri_pkg.sv does not contain definition for ADDR_SIZE_SPI_DEVICE, which leads to a verilator build error.

      always_comb begin
        // default steering to generate error response if address is not within the range
        dev_sel_s1n_5 = 3'd4;
        if ((tl_s1n_5_us_h2d.a_address &
             ~(ADDR_MASK_UART)) == ADDR_SPACE_UART) begin
          dev_sel_s1n_5 = 3'd0;
    
        end else if (((tl_s1n_5_us_h2d.a_address < (ADDR_SPACE_SPI_DEVICE + ADDR_SIZE_SPI_DEVICE)) &&
           (tl_s1n_5_us_h2d.a_address >= ADDR_SPACE_SPI_DEVICE))) begin
          dev_sel_s1n_5 = 3'd1;
    
        end else if ((tl_s1n_5_us_h2d.a_address &
                      ~(ADDR_MASK_TIMER)) == ADDR_SPACE_TIMER) begin
          dev_sel_s1n_5 = 3'd2;
    
        end else if ((tl_s1n_5_us_h2d.a_address &
                      ~(ADDR_MASK_PLIC)) == ADDR_SPACE_PLIC) begin
          dev_sel_s1n_5 = 3'd3;
    end
      end

    The size will be increased to 0x2000 bytes to avoid this issue without disrupting the address ranges of other devices.

  3. raylau1 commented on Jan 26, 2026

    @raylau1
    ContributorAuthor

    FTDI tool JEDEC ID read, SFDP read and test-page now work on FPGA

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions