File: program_h.sv

package info (click to toggle)
verilator 5.038-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 162,552 kB
  • sloc: cpp: 139,204; python: 20,931; ansic: 10,222; yacc: 6,000; lex: 1,925; makefile: 1,260; sh: 494; perl: 282; fortran: 22
file content (34 lines) | stat: -rw-r--r-- 1,072 bytes parent folder | download | duplicates (4)
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
// DESCRIPTION: Verilator: Large test for SystemVerilog

// This file ONLY is placed into the Public Domain, for any use,
// without warranty, 2012.
// SPDX-License-Identifier: CC0-1.0

// Contributed by M W Lund, Atmel Corporation.

`ifndef _PROGRAM_H_V_
 `define _PROGRAM_H_V_

// *****************************************************************************
// Assembly Mnemonic Defines
// *****************************************************************************

typedef enum reg [3:0] { R0,R1,R2,R3,R4,R5,R6,R7,
                         R8,R9,R10,R11,R12,R13,R14,R15 } cpu_registers;

`define NOP            16'h0000,
`define JMP( k8 )      {4'h1, 4'h0, 8'h k8},
`define LDI( rd, k8 )  {4'h4,   rd, 8'h k8},
`define STS( k8, rs )  {4'h8,   rs, 8'h k8},
`define LDS( rd, k8 )  {4'h9,   rd, 8'h k8},
`define EOP            16'h0000



// *****************************************************************************
// Include ROM
// *****************************************************************************

`include "rom.sv"

`endif // !`ifdef _PROGRAM_H_V_