Skip to content

Commit 233f2ce

Browse files
committed
Shortened shift_reg_4608 to 4607 to leave one CLB for constant generator.
Signed-off-by: Maciej Kurc <[email protected]>
1 parent 6317e15 commit 233f2ce

File tree

4 files changed

+40
-13
lines changed

4 files changed

+40
-13
lines changed

quicklogic/qlf_k4n8/tests/features/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ add_subdirectory(pcf_option)
77
add_subdirectory(pcf_and_sdc_option)
88
add_subdirectory(adder_columns)
99
add_subdirectory(adder_max)
10-
add_subdirectory(shift_reg_4608)
10+
#add_subdirectory(shift_reg_4608) # Disabled as it doesn't fit k4n8. Need one free LUT for const0 generator
11+
add_subdirectory(shift_reg_4607)
1112
add_subdirectory(install_test)
1213
add_subdirectory(io_max)
1314
add_subdirectory(io_reg_max)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
add_file_target(FILE shift_reg_4607.v SCANNER_TYPE verilog)
2+
3+
add_fpga_target(
4+
NAME shift_reg_4607_test-umc22-adder
5+
TOP shift_reg_4607
6+
BOARD qlf_k4n8-qlf_k4n8_umc22_slow_board
7+
SOURCES shift_reg_4607.v
8+
EXPLICIT_ADD_FILE_TARGET
9+
)
10+
11+
add_dependencies(all_qlf_k4n8_tests_adder shift_reg_4607_test-umc22-adder_bit)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//-----------------------------------------------------//
2+
// Design Name : Shift_reg
3+
// File Name : Shift_reg_4608.v
4+
// Function : Shift register
5+
//------------------------------------------------------//
6+
7+
8+
module shift_reg_4607 #( parameter size = 4606 ) (shift_in, clk, clr, shift_out);
9+
10+
// Port Declaration
11+
input shift_in;
12+
input clk;
13+
input clr;
14+
output shift_out;
15+
16+
reg [ size:0 ] shift; // shift register
17+
18+
always @ (posedge clk) begin
19+
if (clr)
20+
shift <= 0;
21+
else
22+
shift <= { shift[size-1:0] , shift_in } ;
23+
end
24+
25+
assign shift_out = shift[size];
26+
27+
endmodule

quicklogic/qlf_k4n8/tests/features/shift_reg_4608/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)