Skip to content

Commit

Permalink
altera: fixed UFM: MAX10 memory is in reverse order, UFM1 is BEFORE UFM0
Browse files Browse the repository at this point in the history
  • Loading branch information
trabucayre committed Feb 16, 2025
1 parent 5b6ccf7 commit 7ed6260
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/altera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,19 +387,18 @@ void Altera::max10_program()
uint8_t *ufm_data[2], *cfm_data[3]; // memory pointers (2 for UFM, 3 for CFM)

// UFM Mapping
ufm_data[0] = _bit.getData("UFM");
ufm_data[1] = &ufm_data[0][mem.ufm_len[0] * 4]; // Just after UFM0 (but size may differs
ufm_data[1] = _bit.getData("UFM");
ufm_data[0] = &ufm_data[1][mem.ufm_len[0] * 4]; // Just after UFM1 (but size may differs

// CFM Mapping
cfm_data[2] = &ufm_data[1][mem.ufm_len[1] * 4]; // First CFM section in FPGA internal flash
cfm_data[2] = &ufm_data[0][mem.ufm_len[1] * 4]; // First CFM section in FPGA internal flash
cfm_data[1] = &cfm_data[2][mem.cfm_len[2] * 4]; // Second CFM section but just after CFM2
cfm_data[0] = &cfm_data[1][mem.cfm_len[1] * 4]; // last CFM section but just after CFM1

// DSM Mapping
const uint8_t *dsm_data = _bit.getData("ICB");
const int dsm_len = _bit.getLength("ICB") / 32; // getLength (bits) dsm_len in 32bits word


// Start!
max10_flow_enable();

Expand Down

0 comments on commit 7ed6260

Please sign in to comment.