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

Subversion Repositories robust_reg

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /robust_reg
    from Rev 15 to Rev 16
    Reverse comparison

Rev 15 → Rev 16

/trunk/src/base/regfile.html
1,33 → 1,33
<##//////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
//// eyal@provartec.com ////
//// ////
//// Downloaded from: http://www.opencores.org ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2010 Provartec LTD ////
//// www.provartec.com ////
//// info@provartec.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// This source file is free software; you can redistribute it ////
//// and/or modify it under the terms of the GNU Lesser General ////
//// Public License as published by the Free Software Foundation.////
//// ////
//// This source is distributed in the hope that it will be ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
//// PURPOSE. See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html ////
//// ////
//////////////////////////////////////////////////////////////////##>
<##//////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
//// eyal@provartec.com ////
//// ////
//// Downloaded from: http://www.opencores.org ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2010 Provartec LTD ////
//// www.provartec.com ////
//// info@provartec.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// This source file is free software; you can redistribute it ////
//// and/or modify it under the terms of the GNU Lesser General ////
//// Public License as published by the Free Software Foundation.////
//// ////
//// This source is distributed in the hope that it will be ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
//// PURPOSE. See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html ////
//// ////
//////////////////////////////////////////////////////////////////##>
 
OUTFILE REGNAME_regfile.html
OUTFILE PREFIX_regfile.html
INCLUDE def_regfile.txt
 
 
42,7 → 42,7
<li>Description: GROUP_REGS[RX].DESC
<li>Fields:
<ul>
<b> GROUP_REGRX [EXPR(GROUP_REGRX.WIDTH+GROUP_REGRX.START-1):GROUP_REGRX.START]</b><ul><p>Description: GROUP_REGRX.DESC</p><p>Access: TYPE_GROUP_REGRX.TYPE</p><p>Default value: GROUP_REGRX.DEFAULT</p></ul>
<b> GROUP_REGRX [EXPR(GROUP_REGRX.WIDTH+GROUP_REGRX.FIRST_BIT-1):GROUP_REGRX.FIRST_BIT]</b><ul><p>Description: GROUP_REGRX.DESC</p><p>Access: TYPE_GROUP_REGRX.TYPE</p><p>Default value: GROUP_REGRX.DEFAULT</p></ul>
</ul>
</ul>
</ul>
/trunk/src/base/regfile.v
1,38 → 1,38
/////////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
//// eyal@provartec.com ////
//// ////
//// Downloaded from: http://www.opencores.org ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2010 Provartec LTD ////
//// www.provartec.com ////
//// info@provartec.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// This source file is free software; you can redistribute it ////
//// and/or modify it under the terms of the GNU Lesser General ////
//// Public License as published by the Free Software Foundation.////
//// ////
//// This source is distributed in the hope that it will be ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
//// PURPOSE. See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html ////
//// ////
/////////////////////////////////////////////////////////////////////
<##//////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
//// eyal@provartec.com ////
//// ////
//// Downloaded from: http://www.opencores.org ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2010 Provartec LTD ////
//// www.provartec.com ////
//// info@provartec.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// This source file is free software; you can redistribute it ////
//// and/or modify it under the terms of the GNU Lesser General ////
//// Public License as published by the Free Software Foundation.////
//// ////
//// This source is distributed in the hope that it will be ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
//// PURPOSE. See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html ////
//// ////
//////////////////////////////////////////////////////////////////##>
 
OUTFILE REGNAME_regfile.v
OUTFILE PREFIX_regfile.v
INCLUDE def_regfile.txt
 
ITER RX GROUP_REGS.NUM
 
module REGNAME_regfile (PORTS);
module PREFIX_regfile (PORTS);
 
parameter ADDR_BITS = 16;
 
88,7 → 88,7
end
else if (wr_regRX)
begin
GROUP_REGRX.SON(TYPE==TYPE_RW) <= #FFD pwdata[EXPR(GROUP_REGRX.WIDTH+GROUP_REGRX.START-1):GROUP_REGRX.START];
GROUP_REGRX.SON(TYPE==TYPE_RW) <= #FFD pwdata[EXPR(GROUP_REGRX.WIDTH+GROUP_REGRX.FIRST_BIT-1):GROUP_REGRX.FIRST_BIT];
end
ENDIF TRUE(GROUP_REGS[RX].TYPE == TYPE_RW)
101,7 → 101,7
begin
rd_regGROUP_REGS.SON(TYPE != TYPE_WO).IDX = {32{1'b0}};
rd_regRX[EXPR(GROUP_REGRX.WIDTH+GROUP_REGRX.START-1):GROUP_REGRX.START] = GROUP_REGRX.SON(TYPE != TYPE_WO); //GROUP_REGRX.DESC
rd_regRX[EXPR(GROUP_REGRX.WIDTH+GROUP_REGRX.FIRST_BIT-1):GROUP_REGRX.FIRST_BIT] = GROUP_REGRX.SON(TYPE != TYPE_WO); //GROUP_REGRX.DESC
end
always @(*)
/trunk/src/base/regfile.h
1,45 → 1,45
<##//////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
//// eyal@provartec.com ////
//// ////
//// Downloaded from: http://www.opencores.org ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2010 Provartec LTD ////
//// www.provartec.com ////
//// info@provartec.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// This source file is free software; you can redistribute it ////
//// and/or modify it under the terms of the GNU Lesser General ////
//// Public License as published by the Free Software Foundation.////
//// ////
//// This source is distributed in the hope that it will be ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
//// PURPOSE. See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html ////
//// ////
//////////////////////////////////////////////////////////////////##>
<##//////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
//// eyal@provartec.com ////
//// ////
//// Downloaded from: http://www.opencores.org ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2010 Provartec LTD ////
//// www.provartec.com ////
//// info@provartec.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// This source file is free software; you can redistribute it ////
//// and/or modify it under the terms of the GNU Lesser General ////
//// Public License as published by the Free Software Foundation.////
//// ////
//// This source is distributed in the hope that it will be ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
//// PURPOSE. See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html ////
//// ////
//////////////////////////////////////////////////////////////////##>
 
OUTFILE REGNAME_regfile.h
OUTFILE PREFIX_regfile.h
INCLUDE def_regfile.txt
 
//registers
#define REGNAME_GROUP_REGS_ADDR 0xGROUP_REGS.ADDR
#define PREFIX_GROUP_REGS_ADDR 0xGROUP_REGS.ADDR
 
//fields
LOOP RX GROUP_REGS.NUM
//register GROUP_REGS[RX]:
#define REGNAME_GROUP_REGRX_ADDR 0xGROUP_REGS[RX].ADDR
#define REGNAME_GROUP_REGRX_START GROUP_REGRX.START
#define REGNAME_GROUP_REGRX_BITS GROUP_REGRX.WIDTH
#define REGNAME_GROUP_REGRX_MASK 0xHEX(EXPR((2^GROUP_REGRX.WIDTH-1) << GROUP_REGRX.START) 32 NOPRE)
#define PREFIX_GROUP_REGRX_ADDR 0xGROUP_REGS[RX].ADDR
#define PREFIX_GROUP_REGRX_START GROUP_REGRX.FIRST_BIT
#define PREFIX_GROUP_REGRX_BITS GROUP_REGRX.WIDTH
#define PREFIX_GROUP_REGRX_MASK 0xHEX(EXPR((2^GROUP_REGRX.WIDTH-1) << GROUP_REGRX.FIRST_BIT) 32 NOPRE)
 
ENDLOOP RX
 
/trunk/src/base/def_regfile.txt
1,4 → 1,3
 
<##//////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
28,11 → 27,15
//// ////
//////////////////////////////////////////////////////////////////##>
 
REQUIRE(1.4)
REQUIRE(1.5)
 
STARTUSER
 
PARAM COUNT 0
 
INCLUDE def_regs.txt
 
SWAP.GLOBAL MODEL_NAME regfile
SWAP.GLOBAL MODEL_NAME PREFIX configuration registers
SWAP FFD 1 ##flip-flop delay
 
60,8 → 63,9
pready 1 output
}
 
SWAP ADD_REG(NAME, ADDR, TYPE, DESC) GROUP REGS extends { +NEWLINE NAME SON(CONST(ADDR) ADDR) SON(CONST(TYPE) TYPE) SON(CONST(DESC) DESC) +NEWLINE }
SWAP.USER ADD_REG(NAME, ADDR, TYPE, DESC) PARAM REG_NAME COUNT +NEWLINE PARAM COUNT +1 +NEWLINE GROUP.USER REGS extends { +NEWLINE NAME SON(CONST(ADDR) ADDR) SON(CONST(TYPE) TYPE) SON(CONST(DESC) DESC) +NEWLINE } ##Registers:
 
SWAP ADD_FIELD(REGNUM, NAME, BITS, START_BIT, DEFAULT, TYPE, DESC) GROUP REGREGNUM extends { +NEWLINE NAME BITS SON(START START_BIT) SON(CONST(DEFAULT) DEFAULT) SON(CONST(TYPE) TYPE) SON(CONST(DESC) DESC) +NEWLINE }
SWAP.USER ADD_FIELD(REGNAME, NAME, BITS, FIRST_BIT, DEFAULT, TYPE, DESC) GROUP.USER REGREG_REGNAME extends { +NEWLINE NAME BITS SON(CONST(FIRST_BIT) FIRST_BIT) SON(CONST(DEFAULT) DEFAULT) SON(CONST(TYPE) TYPE) SON(CONST(DESC) DESC) +NEWLINE } ##Fields:
 
 
 
/trunk/src/base/def_regs.txt
1,21 → 1,49
SWAP REGNAME DMA
ADD_REG(CONFIG0, 0, TYPE_RW, "DMA command reg 0")
ADD_REG(CONFIG1, 4, TYPE_RW, "DMA command reg 1")
ADD_REG(CONFIG2, 8, TYPE_RW, "DMA command reg 2")
ADD_REG(CONFIG3, C, TYPE_RW, "DMA command reg 3")
ADD_REG(START, 20, TYPE_WO, "Channel start")
ADD_REG(STATUS, 30, TYPE_RO, "Channel status")
 
ADD_FIELD(0, rd_start_addr, 32, 0, 0, TYPE_RW, "Read start address")
ADD_FIELD(1, wr_start_addr, 32, 0, 0, TYPE_RW, "Write start address")
ADD_FIELD(2, buffer_size, 32, 0, 0, TYPE_RW, "Buffer size")
ADD_FIELD(3, set_int, 1, 0, 0, TYPE_RW, "Set interrupt on completion")
ADD_FIELD(3, cmd_last, 1, 1, 1, TYPE_RW, "Last command in list")
ADD_FIELD(3, next_addr, 28, 3, 0, TYPE_RW, "Next command address")
ADD_FIELD(4, ch_start , 1, 0, 0, TYPE_WO, "Channel start")
ADD_FIELD(5, buffer_count, 16, 0, 0, TYPE_RO, "Buffer counter")
ADD_FIELD(5, int_count, 16, 16, 0, TYPE_RO, "Interrupt counter")
 
<##//////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
//// eyal@provartec.com ////
//// ////
//// Downloaded from: http://www.opencores.org ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2010 Provartec LTD ////
//// www.provartec.com ////
//// info@provartec.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// This source file is free software; you can redistribute it ////
//// and/or modify it under the terms of the GNU Lesser General ////
//// Public License as published by the Free Software Foundation.////
//// ////
//// This source is distributed in the hope that it will be ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
//// PURPOSE. See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html ////
//// ////
//////////////////////////////////////////////////////////////////##>
 
SWAP.USER PREFIX DMA ## Prefix for all modules and file names
ADD_REG(CONFIG0, 0, TYPE_RW, "DMA command reg 0")
ADD_REG(CONFIG1, 4, TYPE_RW, "DMA command reg 1")
ADD_REG(CONFIG2, 8, TYPE_RW, "DMA command reg 2")
ADD_REG(CONFIG3, C, TYPE_RW, "DMA command reg 3")
ADD_REG(START, 20, TYPE_WO, "Channel start")
ADD_REG(STATUS, 30, TYPE_RO, "Channel status")
 
 
ADD_FIELD(CONFIG0, rd_start_addr, 32, 0, 0, TYPE_RW, "Read start address")
ADD_FIELD(CONFIG1, wr_start_addr, 32, 0, 0, TYPE_RW, "Write start address")
ADD_FIELD(CONFIG2, buffer_size, 32, 0, 0, TYPE_RW, "Buffer size")
ADD_FIELD(CONFIG3, set_int, 1, 0, 0, TYPE_RW, "Set interrupt on completion")
ADD_FIELD(CONFIG3, cmd_last, 1, 1, 1, TYPE_RW, "Last command in list")
ADD_FIELD(CONFIG3, next_addr, 28, 4, 0, TYPE_RW, "Next command address")
ADD_FIELD(START, ch_start , 1, 0, 0, TYPE_WO, "Channel start")
ADD_FIELD(STATUS, buffer_count, 16, 0, 0, TYPE_RO, "Buffer counter")
ADD_FIELD(STATUS, int_count, 16, 16, 0, TYPE_RO, "Interrupt counter")
 
/trunk/src/base/regfile_top.txt
29,6 → 29,6
 
OUTFILE NULL
CREATE regfile.v
CREATE.USER regfile.v
CREATE regfile.h DEFCMD(DEFINE NOT_IN_LIST)
CREATE regfile.html DEFCMD(DEFINE NOT_IN_LIST)

powered by: WebSVN 2.1.0

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