-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
NouranAbdelaziz
committed
May 9, 2024
1 parent
af69b9a
commit 28bc314
Showing
8 changed files
with
103 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ info: | |
- serial | ||
bus: | ||
- generic | ||
type": soft | ||
type: soft | ||
status: verified | ||
cell_count: | ||
- IP: TBD | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2023 Efabless Corp. | ||
Copyright 2024 Efabless Corp. | ||
Author: Mohamed Shalan ([email protected]) | ||
|
@@ -21,6 +21,83 @@ | |
|
||
`timescale 1ns/1ps | ||
`default_nettype none | ||
|
||
|
||
|
||
/* | ||
Copyright 2020 AUCOHL | ||
Author: Mohamed Shalan ([email protected]) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
module EF_I2S_AHBL #( | ||
parameter | ||
|
@@ -132,11 +209,11 @@ module EF_I2S_AHBL #( | |
wire [AW-1:0] RX_FIFO_LEVEL_WIRE; | ||
assign RX_FIFO_LEVEL_WIRE[(AW - 1) : 0] = fifo_level; | ||
|
||
reg [0:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[0 : 0]; | ||
reg [AW-1:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[(AW - 1) : 0]; | ||
always @(posedge HCLK or negedge HRESETn) if(~HRESETn) RX_FIFO_THRESHOLD_REG <= 0; | ||
else if(ahbl_we & (last_HADDR[16-1:0]==RX_FIFO_THRESHOLD_REG_OFFSET)) | ||
RX_FIFO_THRESHOLD_REG <= HWDATA[1-1:0]; | ||
RX_FIFO_THRESHOLD_REG <= HWDATA[AW-1:0]; | ||
|
||
reg [0:0] RX_FIFO_FLUSH_REG; | ||
assign fifo_flush = RX_FIFO_FLUSH_REG[0 : 0]; | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2023 Efabless Corp. | ||
Copyright 2024 Efabless Corp. | ||
Author: Mohamed Shalan ([email protected]) | ||
|
@@ -101,9 +101,9 @@ module EF_I2S_AHBL #( | |
wire [AW-1:0] RX_FIFO_LEVEL_WIRE; | ||
assign RX_FIFO_LEVEL_WIRE[(AW - 1) : 0] = fifo_level; | ||
|
||
reg [0:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[0 : 0]; | ||
`AHBL_REG(RX_FIFO_THRESHOLD_REG, 0, 1) | ||
reg [AW-1:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[(AW - 1) : 0]; | ||
`AHBL_REG(RX_FIFO_THRESHOLD_REG, 0, AW) | ||
|
||
reg [0:0] RX_FIFO_FLUSH_REG; | ||
assign fifo_flush = RX_FIFO_FLUSH_REG[0 : 0]; | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2023 Efabless Corp. | ||
Copyright 2024 Efabless Corp. | ||
Author: Mohamed Shalan ([email protected]) | ||
|
@@ -178,11 +178,11 @@ module EF_I2S_APB #( | |
wire [AW-1:0] RX_FIFO_LEVEL_WIRE; | ||
assign RX_FIFO_LEVEL_WIRE[(AW - 1) : 0] = fifo_level; | ||
|
||
reg [0:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[0 : 0]; | ||
reg [AW-1:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[(AW - 1) : 0]; | ||
always @(posedge PCLK or negedge PRESETn) if(~PRESETn) RX_FIFO_THRESHOLD_REG <= 0; | ||
else if(apb_we & (PADDR[16-1:0]==RX_FIFO_THRESHOLD_REG_OFFSET)) | ||
RX_FIFO_THRESHOLD_REG <= PWDATA[1-1:0]; | ||
RX_FIFO_THRESHOLD_REG <= PWDATA[AW-1:0]; | ||
|
||
reg [0:0] RX_FIFO_FLUSH_REG; | ||
assign fifo_flush = RX_FIFO_FLUSH_REG[0 : 0]; | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2023 Efabless Corp. | ||
Copyright 2024 Efabless Corp. | ||
Author: Mohamed Shalan ([email protected]) | ||
|
@@ -101,9 +101,9 @@ module EF_I2S_APB #( | |
wire [AW-1:0] RX_FIFO_LEVEL_WIRE; | ||
assign RX_FIFO_LEVEL_WIRE[(AW - 1) : 0] = fifo_level; | ||
|
||
reg [0:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[0 : 0]; | ||
`APB_REG(RX_FIFO_THRESHOLD_REG, 0, 1) | ||
reg [AW-1:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[(AW - 1) : 0]; | ||
`APB_REG(RX_FIFO_THRESHOLD_REG, 0, AW) | ||
|
||
reg [0:0] RX_FIFO_FLUSH_REG; | ||
assign fifo_flush = RX_FIFO_FLUSH_REG[0 : 0]; | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2023 Efabless Corp. | ||
Copyright 2024 Efabless Corp. | ||
Author: Mohamed Shalan ([email protected]) | ||
|
@@ -165,9 +165,9 @@ module EF_I2S_WB #( | |
wire [AW-1:0] RX_FIFO_LEVEL_WIRE; | ||
assign RX_FIFO_LEVEL_WIRE[(AW - 1) : 0] = fifo_level; | ||
|
||
reg [0:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[0 : 0]; | ||
always @(posedge clk_i or posedge rst_i) if(rst_i) RX_FIFO_THRESHOLD_REG <= 0; else if(wb_we & (adr_i[16-1:0]==RX_FIFO_THRESHOLD_REG_OFFSET)) RX_FIFO_THRESHOLD_REG <= dat_i[1-1:0]; | ||
reg [AW-1:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[(AW - 1) : 0]; | ||
always @(posedge clk_i or posedge rst_i) if(rst_i) RX_FIFO_THRESHOLD_REG <= 0; else if(wb_we & (adr_i[16-1:0]==RX_FIFO_THRESHOLD_REG_OFFSET)) RX_FIFO_THRESHOLD_REG <= dat_i[AW-1:0]; | ||
|
||
reg [0:0] RX_FIFO_FLUSH_REG; | ||
assign fifo_flush = RX_FIFO_FLUSH_REG[0 : 0]; | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2023 Efabless Corp. | ||
Copyright 2024 Efabless Corp. | ||
Author: Mohamed Shalan ([email protected]) | ||
|
@@ -101,9 +101,9 @@ module EF_I2S_WB #( | |
wire [AW-1:0] RX_FIFO_LEVEL_WIRE; | ||
assign RX_FIFO_LEVEL_WIRE[(AW - 1) : 0] = fifo_level; | ||
|
||
reg [0:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[0 : 0]; | ||
`WB_REG(RX_FIFO_THRESHOLD_REG, 0, 1) | ||
reg [AW-1:0] RX_FIFO_THRESHOLD_REG; | ||
assign fifo_level_threshold = RX_FIFO_THRESHOLD_REG[(AW - 1) : 0]; | ||
`WB_REG(RX_FIFO_THRESHOLD_REG, 0, AW) | ||
|
||
reg [0:0] RX_FIFO_FLUSH_REG; | ||
assign fifo_flush = RX_FIFO_FLUSH_REG[0 : 0]; | ||
|
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