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

Subversion Repositories myblaze

[/] [myblaze/] [trunk/] [rtl/] [defines.py] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rockee
# -*- coding: utf-8 -*-
2
"""
3
    defines.py
4
    ==========
5
 
6
    Constants and Enums
7
 
8 5 rockee
    :copyright: Copyright (c) 2010 Jian Luo
9
    :author-email: jian.luo.cn(at_)gmail.com
10
    :license: LGPL, see LICENSE for details
11 2 rockee
    :revision: $Id: defines.py 6 2010-11-21 23:18:44Z rockee $
12
"""
13
 
14 6 rockee
from myhdl import enum, instances
15 2 rockee
 
16
DEBUG = True
17
DEBUG_VERBOSE = 1
18
 
19
CFG_IMEM_SIZE = 16
20
CFG_IMEM_WIDTH = 32
21
CFG_DMEM_WIDTH = 32
22
CFG_DMEM_SIZE = 32
23
CFG_GPRF_SIZE = 5
24
CFG_REG_FWD_WRB = True
25
 
26
OPG_ADD = 0b00      # 0b00ixxx add, sub, cmp
27
OPG_CMP = 0b000101  # 0b000101 cmp
28
OPG_MUL = 0b01000   # 0b01i000 integer multiply
29
OPG_BSF = 0b01001   # 0b01i001 barrel shift
30
OPG_DIV = 0b01010   # 0b010010 integer divide
31
OPG_FSL = 0b01011   # 0b01d011 fsl command
32
OPG_FLT = 0b01110   # 0b010110 float
33
OPG_LOG = 0b100     # 0b10i0xx logic and pattern compare
34
OPG_IMM = 0b101100  # 0b101100 imm
35
OPG_EXT = 0b100100  # 0b100100 shift right, sext, cache
36
OPG_SPR = 0b100101  # 0b100101 move from/to special register
37
OPG_RET = 0b101101  # 0b101101 return
38
OPG_BRU = 0b10110   # 0b10i110 unconditional branch
39
OPG_BCC = 0b10111   # 0b10i111 conditional branch
40
OPG_MEM = 0b11      # 0b11ixxx load, store
41
 
42
 
43
alu_operation = enum('ALU_ADD', 'ALU_OR', 'ALU_AND', 'ALU_XOR',
44
                     'ALU_SHIFT', 'ALU_SEXT8', 'ALU_SEXT16', #)
45
                     'ALU_MUL', 'ALU_BS')
46
src_type_a = enum('REGA', 'NOT_REGA', 'PC', 'REGA_ZERO')
47
src_type_b = enum('REGB', 'NOT_REGB', 'IMM', 'NOT_IMM')
48
carry_type = enum('C_ZERO', 'C_ONE', 'ALU', 'ARITH')
49
branch_condition = enum('BEQ', 'BNE', 'BLT', 'BLE', 'BGT', 'BGE',
50
                        'BRU', 'NOP')
51
transfer_size_type = enum('WORD', 'HALFWORD', 'BYTE')
52
 
53
### EOF ###
54
# vim:smarttab:sts=4:ts=4:sw=4:et:ai:tw=80:
55
 

powered by: WebSVN 2.1.0

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