From 11159ec3c9cb23d5143ceea903ef33791df7b27e Mon Sep 17 00:00:00 2001 From: Obijuan Date: Sat, 4 Nov 2023 11:15:21 +0100 Subject: [PATCH] Generation of all the UINT8 components --- Templates/generate-uint.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Templates/generate-uint.py b/Templates/generate-uint.py index b84ed900..068a39e2 100644 --- a/Templates/generate-uint.py +++ b/Templates/generate-uint.py @@ -3,10 +3,22 @@ BLOCK_ID = "Uint" VERSION = "0.4" DESCRIPTION = "unsigned integer extension to 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):