generated from efabless/caravel_user_project
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
312 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,33 @@ | ||
#ifndef SNN_DATA_H | ||
#define SNN_DATA_H | ||
|
||
extern Packet packet_data[NUM_CORES][1000]; | ||
extern Core core_data[NUM_CORES]; | ||
#define NUM_CORES 5 | ||
#define NEURONS_PER_CORE 32 | ||
#define AXONS_PER_CORE 256 | ||
|
||
typedef struct { | ||
int8_t membrane_potential; | ||
int8_t reset_posi_potential; | ||
int8_t reset_nega_potential; | ||
int8_t weights[4]; | ||
int8_t leakage_value; | ||
int8_t positive_threshold; | ||
int8_t negative_threshold; | ||
uint8_t axon_dest; | ||
} Neuron; | ||
|
||
typedef struct { | ||
Neuron neurons[NEURONS_PER_CORE]; | ||
uint32_t synapse_connection[AXONS_PER_CORE]; | ||
} Core; | ||
|
||
typedef struct { | ||
int8_t dx; | ||
int8_t dy; | ||
uint8_t axon_dest; | ||
} Packet; | ||
|
||
extern Packet packets[1024]; | ||
extern Core cores[NUM_CORES]; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.