-
Notifications
You must be signed in to change notification settings - Fork 907
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split sim models into multiple files and implement few
- Loading branch information
Showing
8 changed files
with
84 additions
and
83 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
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
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module NX_GCK_U(SI1, SI2, CMD, SO); | ||
input CMD; | ||
input SI1; | ||
input SI2; | ||
output SO; | ||
parameter inv_in = 1'b0; | ||
parameter inv_out = 1'b0; | ||
parameter std_mode = "BYPASS"; | ||
|
||
wire SI1_int = inv_in ? ~SI1 : SI1; | ||
wire SI2_int = inv_in ? ~SI2 : SI2; | ||
|
||
wire SO_int; | ||
generate if (std_mode == "BYPASS") begin | ||
assign SO_int = SI1_int; | ||
end | ||
else if (std_mode == "MUX") begin | ||
assign SO_int = CMD ? SI1_int : SI2_int; | ||
end | ||
else if (std_mode == "CKS") begin | ||
assign SO_int = CMD ? SI1_int : 1'b0; | ||
end | ||
else if (std_mode == "CSC") begin | ||
assign SO_int = CMD; | ||
end | ||
else | ||
$error("Unrecognised std_mode"); | ||
endgenerate | ||
assign SO = inv_out ? ~SO_int : SO_int; | ||
endmodule |
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