Skip to content

Commit

Permalink
Change task size to a define
Browse files Browse the repository at this point in the history
  • Loading branch information
lukamac committed Jan 29, 2024
1 parent 9e0b211 commit 1a4f873
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions ne16/hal/ne16.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#define NE16_STATUS_EMPTY (0x000)
#define NE16_STATUS_FULL (0x101)

inline int ne16_task_queue_size(ne16_dev_t *dev) { return 2; }

inline int ne16_task_queue_tasks_in_flight(ne16_dev_t *dev) {
uint32_t status = hwpe_task_queue_status(&dev->hwpe_dev);
return (status & 0x1) + ((status >> 8) & 0x1);
Expand Down
3 changes: 2 additions & 1 deletion ne16/hal/ne16.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
#include "hwpe.h"
#include <stdint.h>

#define NE16_TASK_QUEUE_SIZE (2)

typedef struct ne16_dev_t {
hwpe_dev_t hwpe_dev; /* Implements the HWPE device interface */
} ne16_dev_t;

int ne16_task_queue_size(ne16_dev_t *dev);
int ne16_task_queue_tasks_in_flight(ne16_dev_t *dev);
int ne16_task_queue_empty(ne16_dev_t *dev);
int ne16_task_queue_full(ne16_dev_t *dev);
Expand Down
2 changes: 0 additions & 2 deletions neureka/hal/neureka.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#define NEUREKA_STATUS_EMPTY (0x000)
#define NEUREKA_STATUS_FULL (0x101)

inline int neureka_task_queue_size(neureka_dev_t *dev) { return 2; }

inline int neureka_task_queue_tasks_in_flight(neureka_dev_t *dev) {
uint32_t status = hwpe_task_queue_status(&dev->hwpe_dev);
return (status & 0x1) + ((status >> 8) & 0x1);
Expand Down
3 changes: 2 additions & 1 deletion neureka/hal/neureka.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
#include "hwpe.h"
#include <stdint.h>

#define NEUREKA_TASK_QUEUE_SIZE (2)

typedef struct neureka_dev_t {
hwpe_dev_t hwpe_dev; /* Implements the HWPE device interface */
} neureka_dev_t;

int neureka_task_queue_size(neureka_dev_t *dev);
int neureka_task_queue_tasks_in_flight(neureka_dev_t *dev);
int neureka_task_queue_empty(neureka_dev_t *dev);
int neureka_task_queue_full(neureka_dev_t *dev);
Expand Down

0 comments on commit 1a4f873

Please sign in to comment.