Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
acmert authored Dec 17, 2020
1 parent 985b41b commit 569d517
Show file tree
Hide file tree
Showing 42 changed files with 14,024 additions and 0 deletions.
35 changes: 35 additions & 0 deletions pe1/BRAM.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

/*
The designers:
Ahmet Can Mert <ahmetcanmert@sabanciuniv.edu>
Ferhat Yaman <ferhatyaman@sabanciuniv.edu>
To the extent possible under law, the implementer has waived all copyright
and related or neighboring rights to the source code in this file.
http://creativecommons.org/publicdomain/zero/1.0/
*/

// read latency is 1 cc

module BRAM(input clk,
input wen,
input [7:0] waddr,
input [11:0] din,
input [7:0] raddr,
output reg [11:0] dout);
// bram
(* ram_style="block" *) reg [11:0] blockram [255:0];

// write operation
always @(posedge clk) begin
if(wen)
blockram[waddr] <= din;
end

// read operation
always @(posedge clk) begin
dout <= blockram[raddr];
end

endmodule
Loading

0 comments on commit 569d517

Please sign in to comment.