Skip to content

Commit

Permalink
fix vcs compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
NouranAbdelaziz committed Jul 9, 2024
1 parent 1f99038 commit ff4aa9c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion EF_I2C.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
license: APACHE 2.0
author: Mohamed Shalan
email: [email protected]
version: v1.0.7
version: v1.0.8
date: 09-07-2024
category: digital
tags:
Expand Down
23 changes: 12 additions & 11 deletions hdl/rtl/bus_wrappers/EF_I2C_APB.pp.v
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@ module EF_I2C_APB # (
localparam[15:0] GCLK_REG_ADDR = 16'hFF10;

reg [0:0] GCLK_REG;
always @(posedge PCLK or negedge PRESETn) if(~PRESETn) GCLK_REG <= 0;
else if(apb_we & (PADDR[15:0]==GCLK_REG_ADDR)) begin
GCLK_REG <= PWDATA[1-1:0];
apb_wr_ack <= 1;
end else if(apb_valid & (PADDR[15:0]==GCLK_REG_ADDR))
apb_rd_ack <= 1;
else begin
apb_wr_ack <= 0;
apb_rd_ack <= 0;
end

wire clk_g;
wire clk_gated_en = GCLK_REG[0];
Expand Down Expand Up @@ -169,7 +159,18 @@ module EF_I2C_APB # (

.flags(flags)
);


always @(posedge PCLK or negedge PRESETn) if(~PRESETn) GCLK_REG <= 0;
else if(apb_we & (PADDR[15:0]==GCLK_REG_ADDR)) begin
GCLK_REG <= PWDATA[1-1:0];
apb_wr_ack <= 1;
end else if(apb_valid & (PADDR[15:0]==GCLK_REG_ADDR))
apb_rd_ack <= 1;
else begin
apb_wr_ack <= 0;
apb_rd_ack <= 0;
end

always @(posedge PCLK or negedge PRESETn) if(~PRESETn) IM_REG <= 0;
else if(apb_we & (PADDR[15:0]==IM_REG_ADDR)) begin
IM_REG <= PWDATA[9-1:0];
Expand Down
5 changes: 3 additions & 2 deletions hdl/rtl/bus_wrappers/EF_I2C_APB.v
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ module EF_I2C_APB # (
localparam[15:0] GCLK_REG_ADDR = 16'hFF10;

reg [0:0] GCLK_REG;
`APB_REG(GCLK_REG, 0, 1)

wire clk_g;
wire clk_gated_en = GCLK_REG[0];
Expand Down Expand Up @@ -160,7 +159,9 @@ module EF_I2C_APB # (

.flags(flags)
);


`APB_REG(GCLK_REG, 0, 1)

`APB_REG(IM_REG, 0, 9)

assign i2c_irq = |MIS_REG;
Expand Down
Binary file added v1.0.7.tar.gz
Binary file not shown.

0 comments on commit ff4aa9c

Please sign in to comment.