Skip to content

Commit

Permalink
Generation of all the UINT8 components
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Nov 4, 2023
1 parent 3c56af8 commit 11159ec
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Templates/generate-uint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,22 @@
BLOCK_ID = "Uint"
VERSION = "0.4"
DESCRIPTION = "unsigned integer extension to <N> bits. Verilog implementation"
TARGET_PATH = f"../blocks/Right/{BLOCK_ID}"
BASE_TARGET_PATH = f"../blocks/{BLOCK_ID}/{BLOCK_ID}"

#-- Debug: Generate only one block in the current path for testing
generate_block_from_template(2,8,BLOCK_ID, VERSION, DESCRIPTION)
#generate_block_from_template(2,8,BLOCK_ID, VERSION, DESCRIPTION)

#-- Output bits
OBITS = 8

#-- All the Uints with the same output bits are located in the
#-- same folder (Ex. Uint/Uint08)
TARGET_PATH = f"{BASE_TARGET_PATH}{OBITS:02}"

for i in range(1, OBITS):
generate_block_from_template(i,OBITS, BLOCK_ID, VERSION,
DESCRIPTION, TARGET_PATH)


#-- Generate all the blocks of different sizes (from 2 to 32 bits)
#for i in range(2,33):
Expand Down

0 comments on commit 11159ec

Please sign in to comment.