Skip to content

Commit

Permalink
ol2/tt_top: mask_rev support
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Nov 6, 2023
1 parent 84922e8 commit 8201885
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions ol2/tt_top/openframe_project_wrapper.v
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ module openframe_project_wrapper (
.io_out (gpio_out[37:0]),
.io_oeb (gpio_oeb[37:0]),
.user_clock2 (k_zero),
.mask_rev (mask_rev),
.k_zero (k_zero),
.k_one (k_one)
);
Expand Down
1 change: 1 addition & 0 deletions ol2/tt_top/tt_um_tpl.v
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module {mod_name} (
input wire [7:0] uio_in,
output wire [7:0] uio_out,
output wire [7:0] uio_oe,
input wire [31:0] mask_rev,
input wire ena,
input wire clk,
input wire rst_n
Expand Down
2 changes: 2 additions & 0 deletions py/tt.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def __init__(self, placer, cfg_data):
self.height = cfg_data.get('height', 1)
self.pg_vdd = cfg_data.get('pg_vdd', False)
self.analog = cfg_data.get('analog', False)
self.mask_rev = cfg_data.get('mask_rev', False)

def as_dict(self):
return {
Expand All @@ -125,6 +126,7 @@ def as_dict(self):
'height': self.height,
'pg_vdd': self.pg_vdd,
'analog': self.analog,
'mask_rev': self.mask_rev,
}

@property
Expand Down
4 changes: 4 additions & 0 deletions rtl/tt_top.v
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ module tt_top #(
// From caravel
input wire user_clock2,

// For Tim Edwards - mask_rev
input wire [31:0] mask_rev,

// Convenient constants for top-level tie-offs
output wire k_zero,
output wire k_one
Expand Down Expand Up @@ -237,6 +240,7 @@ module tt_top #(
.ana (l_um_ana[j*N_A+:N_A]),
.ow (l_um_ow[j*U_OW+:U_OW]),
.iw (l_um_iw[j*U_IW+:U_IW]),
.mask_rev(mask_rev),
.ena (l_um_ena[j]),
.k_zero (l_um_k_zero[j]),
.pg_vdd (l_um_pg_vdd[j])
Expand Down
4 changes: 4 additions & 0 deletions rtl/tt_user_module.v.mak
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module tt_user_module #(
inout wire [N_A-1:0] ana,
output wire [N_OW-1:0] ow,
input wire [N_IW-1:0] iw,
input wire [31:0] mask_rev,
input wire ena,
input wire k_zero,
input wire pg_vdd
Expand All @@ -53,6 +54,9 @@ module tt_user_module #(
tt_um_${mod.name} tt_um_I (
% if mod.analog:
.ua (ana),
% endif
% if mod.mask_rev:
.mask_rev (mask_rev),
% endif
.uio_in (uio_in),
.uio_out (uio_out),
Expand Down

0 comments on commit 8201885

Please sign in to comment.