Skip to content

Commit

Permalink
Added snaity check for macrocell count
Browse files Browse the repository at this point in the history
azonenberg committed Jun 13, 2017
1 parent 571e5a6 commit 1d4cbf4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions hdl/xc2c-model/XC2CDevice.v
Original file line number Diff line number Diff line change
@@ -60,6 +60,21 @@ module XC2CDevice(
localparam SHREG_WIDTH = ConfigMemoryWidth(MACROCELLS);
localparam MEM_DEPTH = ConfigMemoryDepth(MACROCELLS);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Sanity checks

initial begin
if( (MACROCELLS != 32) &&
(MACROCELLS != 64) &&
(MACROCELLS != 128) &&
(MACROCELLS != 256) &&
(MACROCELLS != 384) &&
(MACROCELLS != 512) ) begin
$display("Invalid macrocell count");
$finish;
end
end

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// I/Os

0 comments on commit 1d4cbf4

Please sign in to comment.