OpenCores
URL https://opencores.org/ocsvn/instruction_list_pipelined_processor_with_peripherals/instruction_list_pipelined_processor_with_peripherals/trunk

Subversion Repositories instruction_list_pipelined_processor_with_peripherals

[/] [instruction_list_pipelined_processor_with_peripherals/] [trunk/] [hdl/] [defines.v] - Blame information for rev 3

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 maheshpalv
// 16-bit process controller defines
2
 
3
`define         immDataLen                      8
4
 
5
// program counter & instruction register
6
`define         instLen                         15                      // 15-bit fixed-length instructions
7
`define         instOpCodeLen           5
8
`define         instFieldLen            10
9
 
10
// alu opcodes
11
`define         aluOpcodeLen            4
12
`define         AND_alu                         `aluOpcodeLen'b0
13
`define         OR_alu                          `aluOpcodeLen'b1
14
`define         XOR_alu                         `aluOpcodeLen'b10
15
`define         GT_alu                          `aluOpcodeLen'b11
16
`define         GE_alu                          `aluOpcodeLen'b100
17
`define         EQ_alu                          `aluOpcodeLen'b101
18
`define         LE_alu                          `aluOpcodeLen'b110
19
`define         LT_alu                          `aluOpcodeLen'b111
20
`define         ADD_alu                         `aluOpcodeLen'b1000
21
`define         SUB_alu                         `aluOpcodeLen'b1001
22
`define         MUL_alu                         `aluOpcodeLen'b1010
23
`define         DIV_alu                         `aluOpcodeLen'b1011
24
 
25
 
26
// bit RAM
27
`define         bitRamAddrLen           7               // 7-bit address
28
`define         bitRamDepth                     128     // 2^7 = 128 locations
29
 
30
// byte RAM
31
`define         byteRamLen                      8               // 8-bit input
32
`define         byteRamAddrLen          7               // 7-bit address
33
`define         byteRamDepth            128     // 2^7 = 128 locations
34
 
35
// input register
36
`define         inputNumber                     128     // 128 inputs
37
`define         inputAddrLen            7               // 7-bit address
38
 
39
// output register
40
`define         outputNumber            128     // 128 outputs
41
`define         outputAddrLen           7               // 7-bit address
42
 
43
// accumulator multiplexer
44
`define         accMuxSelLen            4               // 2^4 = 16 selections available for accumulator
45
`define         accMuxSel0                      `accMuxSelLen'b0
46
`define         accMuxSel1                      `accMuxSelLen'b1
47
`define         accMuxSel2                      `accMuxSelLen'b10
48
`define         accMuxSel3                      `accMuxSelLen'b11
49
`define         accMuxSel4                      `accMuxSelLen'b100
50
`define         accMuxSel5                      `accMuxSelLen'b101
51
 
52
// operand2 multiplexer
53
`define         op2MuxSelLen            4               // 2^4 = 16 selections available for op2
54
`define         op2MuxSel0                      `op2MuxSelLen'b0
55
`define         op2MuxSel1                      `op2MuxSelLen'b1
56
`define         op2MuxSel2                      `op2MuxSelLen'b10
57
`define         op2MuxSel3                      `op2MuxSelLen'b11
58
`define         op2MuxSel4                      `op2MuxSelLen'b100
59
`define         op2MuxSel5                      `op2MuxSelLen'b101
60
`define         op2MuxSel6                      `op2MuxSelLen'b110
61
 
62
//-----------------------------------------------------------------------------------------------------
63
 
64
// peripheral defines
65
`define         timerAndCounter_peripheral
66
`define         UART_peripheral
67
`define         SPI_peripheral
68
 
69
 
70
//-----------------------------------------------------------------------------------------------------
71
 
72
// Timer-Counter
73
`define         tcAccLen                                8               // 8-bit accumulated value
74
`define         tcPresetLen                     8               // 8-bit preset value
75
`define         tcAddrLen                       4
76
`define         tcTypeLen                       2               // max 4-types
77
`define         tcNumbers                       16              // total 16 modules (8-timers, 8-counters)
78
 
79
`define         timerType1                      `tcTypeLen'b0
80
`define         timerType2                      `tcTypeLen'b1
81
`define         timerType3                      `tcTypeLen'b10
82
 
83
`define         counterType1            `tcTypeLen'b1
84
`define         counterType2            `tcTypeLen'b10
85
 
86
 
87
//-----------------------------------------------------------------------------------------------------
88
 
89
// UART
90
`define         dataBits                        8
91
`define         sbTick                          16      // ticks for stop bits (16 for 1-stopBit)
92
`define         fifoWidth                       4
93
`define                 number_fifo_regs        16
94
`define                 fifoCntrWidth           5
95
`define                 fifoDepth                       16

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.