Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TommiTerza committed Sep 11, 2024
1 parent e4ba80e commit a7e17bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions sw/applications/example_im2col/im2col_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#define HW_CONFIG_SPC

/* Defines which DMA channels are available to the SPC, depending on HW specifications */
//@ToDo: see what include in the open source version
#define SPC_CH_MASK 0b0001

/* Base address of the im2col SPC */
Expand Down Expand Up @@ -105,7 +104,7 @@
#define OW_NHWC (FW * FH * CH * BATCH)
#define OH_NHWC (N_PATCHES_W) * (N_PATCHES_H)

#define START_ID 2
#define START_ID 0

#define TEST_EN 1

Expand Down
2 changes: 1 addition & 1 deletion sw/applications/example_im2col/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main()
}

/* Print the end word for verification */
printf("&\n\r");
PRINTF("&\n\r");

return EXIT_SUCCESS;
}
7 changes: 3 additions & 4 deletions sw/device/lib/drivers/im2col_spc/im2col.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ int get_channel_number(uint32_t mask) {
while (mask > 0) {
channel++;
if (mask & 1) { // If the least significant bit is set
printf("%d\n", channel);
return channel;
return channel - 1;
}
mask >>= 1; // Right shift the mask to check the next bit
}

// If no bit is set, return 0 indicating no valid channel
return 0;
// If no bit is set, return -1 indicating no valid channel
return -1;
}

int run_im2col(im2col_trans_t trans){
Expand Down

0 comments on commit a7e17bd

Please sign in to comment.