新聞中心

        EEPW首頁 > 嵌入式系統 > 設計應用 > 基于fpga二維小波變換核的實時可重構電路

        基于fpga二維小波變換核的實時可重構電路

        作者: 時間:2014-12-07 來源:網絡 收藏

          2. 軟件部分

        本文引用地址:http://www.104case.com/article/266432.htm

          (1)bit n 的生成過程

          

        圖 7 輸出地址bit n 的生成

         

          圖 7 輸出地址bit n 的生成

          

        圖 8 輸入地址bit n 的生成

         

          圖 8 輸入地址bit n 的生成

          (2)部分代碼

          1 #Configuring F and G look-up tables with JBits

          /* define row and column values */

          int row = 5; int col = 4;

          /* define logic function for F LUT */

          int[] F_LUT_Vals = Expr.F_LUT(“~(F1&F2&F3&F4)”);

          /* define logic function for G LUT */

          int[] G_LUT_Vals = Expr.G_LUT(“~(F1|F2|F3|F4)”);

          /* set the F LUT value for slice 0 */

          jbits.set(row, col, LUT.SLICE0_F, F_LUT_Vals);

          /* set the G LUT value for slice 1 */

          jbits.set(row, col, LUT.SLICE1_G, G_LUT_Vals);

          2 #: Adding and configuring an OutputCore

          /* create a signal to run to the cross bar pins on the Slaac1V X2 */

          Bus XBar = new Bus("XP_XBAR", null, 20);

          /* create a new board */

          Slaac1VBoard slaac1V = new Slaac1VBoard("SLAAC1V");

          /* add a cross bar output core to slaac1V board instance */

          int XBarOutput = slaac1V.addOutput(Xbar.getName(), XBar);

          /* configure the IOB resources output operation */

          slaac1V.setOutputInvertT(XBarOutput, true);

          /* implement the slaac1V board */

          slaac1V.implement(0, "slaac1V.ucf");

          3 #Code showing how Slaac1V SRAMs are distinguished through signal names.

          /* define memory signals for Slaac1V X2 memories 0 and 1 */

          Bus addr[] = new Bus[2];

          Bus data[] = new Bus[2];

          /* memory address */

          addr[0] = new Bus("XP_MEM0_ADDR", null, 18); /* SRAM 0 */

          addr[1] = new Bus("XP_MEM1_ADDR", null, 18); /* SRAM 1 */

          /* memory data */

          data[0] = new Bus("XP_MEM0_DATA", null, 12); /* SRAM 0 */

          data[1] = new Bus("XP_MEM1_DATA", null, 12); /* SRAM 1 */

          4 #AdderTree input index computations and partitioning process

          /* calculate the “parent” adder index */

          int log = (int) Math.ceil(Math.log((double)range)/Math.log(2.0));

          int parentAdder = low + (int) Math.pow(2.0,log - 1);

          /* calculate the right sided adder input index */

          range = high - parentAdder;

          log = (int) Math.ceil(Math.log((double)range)/Math.log(2.0));

          int RHSIndex = ((int) Math.pow(2.0, log - 1)) + parentAdder;

          /* calculate the left sided adder input index */

          range = parentAdder - low;

          log = (int) Math.ceil(Math.log((double)range)/Math.log(2.0));

          int LHSIndex = ((int) Math.pow(2.0, log - 1)) + low;

          /* partition left hand side of parent adder recursively */

          AIndex[parentAdder - 1] = LHSIndex - 1;

          deriveAdderTree(low, parentAdder);

          /* partition right hand side of parent adder recursively */

          if (RHSIndex != parentAdder)

          {

          BIndex[parentAdder - 1] = RHSIndex - 1;

          deriveAdderTree(parentAdder, high);

          }

          else /* required if there is an odd number of tree inputs */

          {

          BIndex[parentAdder - 1] = treeInPort.length - 1;

          }

          5 # Slaac1VBoard.java code

          public class Slaac1VBoard extends Board

          {

          public Slaac1VBoard(String name) throws CoreParameterException

          {

          super(name);

          setXCVPackage(xcvPackage);

          setGCLK(GCLK);

          };

          private XCVPackage xcvPackage[] =

          {

          new xcv1000_fg680(), new xcv1000_fg680(), new xcv1000_fg680()

          };

          private static int GCLK = 2;

          }; /* end of Slaac1V board class. */

          3.2 需要的開發平臺


        上一頁 1 2 3 4 下一頁

        關鍵詞: fpga 小波變換 IP核

        評論


        相關推薦

        技術專區

        關閉
        主站蜘蛛池模板: 浪卡子县| 平顶山市| 满城县| 大姚县| 革吉县| 上饶市| 宁南县| 新绛县| 资溪县| 昌邑市| 丰都县| 昌平区| 来宾市| 稻城县| 巫山县| 阳山县| 巧家县| 达州市| 沙洋县| 通化县| 彭水| 佛坪县| 太康县| 应城市| 衡水市| 鄯善县| 济源市| 延庆县| 大冶市| 西宁市| 成武县| 葫芦岛市| 抚宁县| 孝昌县| 两当县| 卓资县| 安达市| 东台市| 罗山县| 天峨县| 绵竹市|