Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 74125,74126,74244 buffers #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions device-index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Buffers, Inverters
[7404](source-7400/7404.v) Hex inverter<br />
[7407](source-7400/7407.v) Hex buffer/driver (OC)<br />
[74125](source-7400/74125.v) Quad bus buffer, negative enable<br />
[74126](source-7400/74126.v) Quad bus buffer, positive enable<br />
[74244](source-7400/74244.v) Octal buffer with 3-state output<br />

## Gates
[7400](source-7400/7400.v) Quad 2-input NAND gate<br />
Expand Down
23 changes: 23 additions & 0 deletions source-7400/74125.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Quad bus buffer, negative enable

module ttl_74125 #(parameter BLOCKS = 4, DELAY_RISE = 0, DELAY_FALL = 0)
(
input [BLOCKS-1:0] C,
input [BLOCKS-1:0] A,
output [BLOCKS-1:0] Y
);

//------------------------------------------------//
integer i;
reg [BLOCKS-1:0] computed;

always @(*)
begin
for (i = 0; i < BLOCKS; i++)
computed[i] = C[i] ? 1'bZ : A[i];
end
//------------------------------------------------//

assign #(DELAY_RISE, DELAY_FALL) Y = computed;

endmodule
23 changes: 23 additions & 0 deletions source-7400/74126.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Quad bus buffer, positive enable

module ttl_74126 #(parameter BLOCKS = 4, DELAY_RISE = 0, DELAY_FALL = 0)
(
input [BLOCKS-1:0] C,
input [BLOCKS-1:0] A,
output [BLOCKS-1:0] Y
);

//------------------------------------------------//
integer i;
reg [BLOCKS-1:0] computed;

always @(*)
begin
for (i = 0; i < BLOCKS; i++)
computed[i] = C[i] ? A[i] : 1'bZ;
end
//------------------------------------------------//

assign #(DELAY_RISE, DELAY_FALL) Y = computed;

endmodule
23 changes: 23 additions & 0 deletions source-7400/74244.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Octal buffer with 3-state output

module ttl_74244 #(parameter WIDTH = 8, DELAY_RISE = 0, DELAY_FALL = 0)
(
input [(WIDTH-1)/4:0] G_bar,
input [WIDTH-1:0] A,
output [WIDTH-1:0] Y
);

//------------------------------------------------//
integer i;
reg [WIDTH-1:0] computed;

always @(*)
begin
for (i = 0; i < WIDTH; i++)
computed[i] = G_bar[i/4] ? 1'bZ : A[i];
end
//------------------------------------------------//

assign #(DELAY_RISE, DELAY_FALL) Y = computed;

endmodule