adds initial version of lwc
This commit is contained in:
32
lwc/src/jambu/arch/rv32/ise.h
Normal file
32
lwc/src/jambu/arch/rv32/ise.h
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright (C) 2021 SCARV project <info@scarv.org>
|
||||
//
|
||||
// Use of this source code is restricted per the MIT license, a copy of which
|
||||
// can be found at https://opensource.org/licenses/MIT (or should be included
|
||||
// as LICENSE.txt within the associated archive or repository).
|
||||
|
||||
// ============================================================================
|
||||
|
||||
#if ( JAMBU_RV32_TYPE2 )
|
||||
.macro jambu.fsri rd, rs1, rs2, imm
|
||||
.insn r CUSTOM_1, 7, \imm+( 0*32), \rd, \rs1, \rs2
|
||||
.endm
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if ( JAMBU_RV32_TYPE3 )
|
||||
.macro jambu.fsr.15 rd, rs1, rs2
|
||||
.insn r CUSTOM_3, 7, ( 0* 1), \rd, \rs1, \rs2
|
||||
.endm
|
||||
.macro jambu.fsr.6 rd, rs1, rs2
|
||||
.insn r CUSTOM_3, 7, ( 1* 1), \rd, \rs1, \rs2
|
||||
.endm
|
||||
.macro jambu.fsr.21 rd, rs1, rs2
|
||||
.insn r CUSTOM_3, 7, ( 2* 1), \rd, \rs1, \rs2
|
||||
.endm
|
||||
.macro jambu.fsr.27 rd, rs1, rs2
|
||||
.insn r CUSTOM_3, 7, ( 3* 1), \rd, \rs1, \rs2
|
||||
.endm
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
24
lwc/src/jambu/arch/rv64/ise.h
Normal file
24
lwc/src/jambu/arch/rv64/ise.h
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2021 SCARV project <info@scarv.org>
|
||||
//
|
||||
// Use of this source code is restricted per the MIT license, a copy of which
|
||||
// can be found at https://opensource.org/licenses/MIT (or should be included
|
||||
// as LICENSE.txt within the associated archive or repository).
|
||||
|
||||
// ============================================================================
|
||||
|
||||
#if ( JAMBU_RV64_TYPE2 )
|
||||
.macro jambu.block.0 rd, rs1, rs2
|
||||
.insn r CUSTOM_3, 7, (32* 1), \rd, \rs1, \rs2
|
||||
.endm
|
||||
.macro jambu.block.1 rd, rs1, rs2
|
||||
.insn r CUSTOM_3, 7, (33* 1), \rd, \rs1, \rs2
|
||||
.endm
|
||||
.macro jambu.block.2 rd, rs1, rs2
|
||||
.insn r CUSTOM_3, 7, (34* 1), \rd, \rs1, \rs2
|
||||
.endm
|
||||
.macro jambu.block.3 rd, rs1, rs2
|
||||
.insn r CUSTOM_3, 7, (35* 1), \rd, \rs1, \rs2
|
||||
.endm
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
Reference in New Issue
Block a user