-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVermicel.sv
43 lines (36 loc) · 1.2 KB
/
Vermicel.sv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// SPDX-License-Identifier: CERN-OHL-W-2.0
// SPDX-FileCopyrightText: 2023 Guillaume Savaton <guillaume.savaton@tiliosys.fr>
//
`default_nettype none
// Vermicel processor core.
//
// This is the main module of the Vermicel core.
// It is a wrapper that allows to choose one of these implementations:
// - Verpipeline: a 5-stage pipeline architecture
// - Versequence: an architecture with a state machine as the sequencer.
module Vermicel #(
parameter bit PIPELINE = 1 // If 1, choose the pipeline architecture.
) (
Verbus.read_only_request ibus, // The instruction fetch bus.
Verbus.read_write_request dbus // The data access bus.
);
generate
if (PIPELINE) begin : gen_pipeline
Verpipeline core (
.ibus(ibus),
.dbus(dbus)
);
end
else begin : gen_sequence
// The state-machine architecture uses dbus for instructions and data.
// These instructions disable ibus.
assign ibus.valid = 0;
assign ibus.address = 0;
assign ibus.lookahead = 0;
Versequence core (
.bus(dbus)
);
end
endgenerate
endmodule