|
|
@ -14,17 +14,17 @@
|
|
|
|
// necessary for implementation of the Work that are available from OpenPOWER
|
|
|
|
// necessary for implementation of the Work that are available from OpenPOWER
|
|
|
|
// via the Power ISA End User License Agreement (EULA) are explicitly excluded
|
|
|
|
// via the Power ISA End User License Agreement (EULA) are explicitly excluded
|
|
|
|
// hereunder, and may be obtained from OpenPOWER under the terms and conditions
|
|
|
|
// hereunder, and may be obtained from OpenPOWER under the terms and conditions
|
|
|
|
// of the EULA.
|
|
|
|
// of the EULA.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, the reference design
|
|
|
|
// Unless required by applicable law or agreed to in writing, the reference design
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
// 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
|
|
|
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
|
|
|
// for the specific language governing permissions and limitations under the License.
|
|
|
|
// for the specific language governing permissions and limitations under the License.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Additional rights, including the ability to physically implement a softcore that
|
|
|
|
// Additional rights, including the ability to physically implement a softcore that
|
|
|
|
// is compliant with the required sections of the Power ISA Specification, are
|
|
|
|
// is compliant with the required sections of the Power ISA Specification, are
|
|
|
|
// available at no cost under the terms of the OpenPOWER Power ISA EULA, which can be
|
|
|
|
// available at no cost under the terms of the OpenPOWER Power ISA EULA, which can be
|
|
|
|
// obtained (along with the Power ISA) here: https://openpowerfoundation.org.
|
|
|
|
// obtained (along with the Power ISA) here: https://openpowerfoundation.org.
|
|
|
|
|
|
|
|
|
|
|
|
`timescale 1 ns / 1 ns
|
|
|
|
`timescale 1 ns / 1 ns
|
|
|
|
|
|
|
|
|
|
|
@ -77,53 +77,28 @@ module tri_regk(
|
|
|
|
output [OFFSET:OFFSET+WIDTH-1] dout;
|
|
|
|
output [OFFSET:OFFSET+WIDTH-1] dout;
|
|
|
|
|
|
|
|
|
|
|
|
parameter [0:WIDTH-1] init_v = INIT;
|
|
|
|
parameter [0:WIDTH-1] init_v = INIT;
|
|
|
|
parameter [0:WIDTH-1] ZEROS = {WIDTH{1'b0}};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// tri_regk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
generate
|
|
|
|
generate
|
|
|
|
begin
|
|
|
|
|
|
|
|
wire sreset;
|
|
|
|
wire sreset;
|
|
|
|
wire [0:WIDTH-1] int_din;
|
|
|
|
|
|
|
|
reg [0:WIDTH-1] int_dout;
|
|
|
|
reg [0:WIDTH-1] int_dout;
|
|
|
|
wire [0:WIDTH-1] vact;
|
|
|
|
|
|
|
|
wire [0:WIDTH-1] vact_b;
|
|
|
|
|
|
|
|
wire [0:WIDTH-1] vsreset;
|
|
|
|
|
|
|
|
wire [0:WIDTH-1] vsreset_b;
|
|
|
|
|
|
|
|
wire [0:WIDTH-1] vthold;
|
|
|
|
|
|
|
|
wire [0:WIDTH-1] vthold_b;
|
|
|
|
|
|
|
|
(* analysis_not_referenced="true" *)
|
|
|
|
(* analysis_not_referenced="true" *)
|
|
|
|
wire unused;
|
|
|
|
wire unused;
|
|
|
|
|
|
|
|
|
|
|
|
if (NEEDS_SRESET == 1)
|
|
|
|
assign sreset = (NEEDS_SRESET == 1) ? nclk[1] : 0;
|
|
|
|
begin : rst
|
|
|
|
|
|
|
|
assign sreset = nclk[1];
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
if (NEEDS_SRESET != 1)
|
|
|
|
|
|
|
|
begin : no_rst
|
|
|
|
|
|
|
|
assign sreset = 1'b0;
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assign vsreset = {WIDTH{sreset}};
|
|
|
|
|
|
|
|
assign vsreset_b = {WIDTH{~sreset}};
|
|
|
|
|
|
|
|
assign int_din = (vsreset_b & din) | (vsreset & init_v);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assign vact = {WIDTH{act | force_t}};
|
|
|
|
always @(posedge nclk[0]) begin: l
|
|
|
|
assign vact_b = {WIDTH{~(act | force_t)}};
|
|
|
|
if (sreset)
|
|
|
|
|
|
|
|
int_dout <= init_v;
|
|
|
|
assign vthold_b = {WIDTH{thold_b}};
|
|
|
|
else if (act & thold_b)
|
|
|
|
assign vthold = {WIDTH{~thold_b}};
|
|
|
|
int_dout <= din;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
always @(posedge nclk[0])
|
|
|
|
|
|
|
|
begin: l
|
|
|
|
|
|
|
|
int_dout <= (((vact & vthold_b) | vsreset) & int_din) | (((vact_b | vthold) & vsreset_b) & int_dout);
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
assign dout = int_dout;
|
|
|
|
assign dout = int_dout;
|
|
|
|
|
|
|
|
|
|
|
|
assign scout = ZEROS;
|
|
|
|
assign scout = {WIDTH{1'b0}};
|
|
|
|
|
|
|
|
|
|
|
|
assign unused = | {vd, gd, nclk, d_mode, sg, delay_lclkr, mpw1_b, mpw2_b, scin};
|
|
|
|
assign unused = | {vd, gd, nclk, d_mode, sg, delay_lclkr, mpw1_b, mpw2_b, scin} | (|nclk[2:`NCLK_WIDTH-1]) | ((NEEDS_SRESET == 1) ? 0 : nclk[1]);
|
|
|
|
end
|
|
|
|
|
|
|
|
endgenerate
|
|
|
|
endgenerate
|
|
|
|
|
|
|
|
|
|
|
|
endmodule
|
|
|
|
endmodule
|
|
|
|