UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer jluisgt
Observer
6,368 Views
Registered: ‎10-22-2014

Implementing xapp 1170 (Accelerator for Floating-Point matrix multiplication) in Vivado 2014.4 cant find some constants

Jump to solution

We are trying to implement the xapp1170 (Accelerator for Floating-Point Matrix Multiplication - Vivado HLS) in Vivado 2014.4. Since the xapp is for implementing in ISE we have some questions about it.

 

At the moment the design is as shown below

 

screenshot-area-2015-01-15-130846.png

 

This design looks right to you? In general we follow the instructions from the xapp, but we dont know to what extent these instructions may be valid for Vivado.

So, these are the questions:

1.- The xapp specifies that the M02_ARESETN port must be connected directly to FCLK_RESET0_N in the Zynq, and several others like it; but when the design is validated some warnings appear indicating that port M02 (and others with reset) should be connected to the Processor System Reset block. Which one is the right?

 

Despite these warnings the bitstream can be generated and exported to SDK but once in SDK there are two constants that are not found in the source files, these are:

XPAR_MMULT_ACCEL_CORE_TOP_0_S_AXI_CONTROL_BUS_BASEADDR and
XPAR_FABRIC_MMULT_ACCEL_CORE_TOP_0_INTERRUPT_INTR, which apparently should be in the xmmult_accel_core_hw.h file generated by Vivado HLS, but the contents of this file are as follows:

 

// ==============================================================
// File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2014.4
// Copyright (C) 2014 Xilinx Inc. All rights reserved.
// 
// ==============================================================

// CONTROL_BUS
// 0x0 : Control signals
//       bit 0  - ap_start (Read/Write/COH)
//       bit 1  - ap_done (Read/COR)
//       bit 2  - ap_idle (Read)
//       bit 3  - ap_ready (Read)
//       bit 7  - auto_restart (Read/Write)
//       others - reserved
// 0x4 : Global Interrupt Enable Register
//       bit 0  - Global Interrupt Enable (Read/Write)
//       others - reserved
// 0x8 : IP Interrupt Enable Register (Read/Write)
//       bit 0  - Channel 0 (ap_done)
//       bit 1  - Channel 1 (ap_ready)
//       others - reserved
// 0xc : IP Interrupt Status Register (Read/TOW)
//       bit 0  - Channel 0 (ap_done)
//       bit 1  - Channel 1 (ap_ready)
//       others - reserved
// (SC = Self Clear, COR = Clear on Read, TOW = Toggle on Write, COH = Clear on Handshake)

#define XMMULT_ACCEL_CORE_CONTROL_BUS_ADDR_AP_CTRL 0x0
#define XMMULT_ACCEL_CORE_CONTROL_BUS_ADDR_GIE     0x4
#define XMMULT_ACCEL_CORE_CONTROL_BUS_ADDR_IER     0x8
#define XMMULT_ACCEL_CORE_CONTROL_BUS_ADDR_ISR     0xc

 

2. -Any idea of what names those constants take on the new version of Vivado HLS? 

0 Kudos
1 Solution

Accepted Solutions
Visitor bsilva
Visitor
10,674 Views
Registered: ‎01-21-2015

Re: Implementing xapp 1170 (Accelerator for Floating-Point matrix multiplication) in Vivado 2014.4 cant find some constants

Jump to solution

I found a way to make it run (using the files from solution http://zedboard.org/content/matrix-multiplication-vivado)

but I'm not sure if it is the right solution:

 

1.- Import all the files of the folder \arm_code

2.- Replace all the references to "platform.h"  to "./bck/platform.h"

3.- Define XPAR_FABRIC_MMULT_ACCEL_CORE_TOP_0_INTERRUPT_INTR to 0 since the HLS block interruption is not used.

4.- Define XPAR_MMULT_ACCEL_CORE_TOP_0_S_AXI_CONTROL_BUS_BASEADDR with the base address value that Vivado assing for the HLS block (in my case 0x43C00000).

 

It compiles and works in the board. Besides it does not look the best solution (since these values should be automatically generated) it seems to solve the problem.

 

Cheers!

View solution in original post

4 Replies
Visitor bsilva
Visitor
6,307 Views
Registered: ‎01-21-2015

Re: Implementing xapp 1170 (Accelerator for Floating-Point matrix multiplication) in Vivado 2014.4 cant find some constants

Jump to solution

Hi jluisgt,

 

In my case, I'm following the adapted solution for the Zedboard: http://zedboard.org/content/matrix-multiplication-vivado

but noticed the same issue with the XPAR_MMULT_ACCEL_CORE_TOP_0_S_AXI_CONTROL_BUS_BASEADDR and
XPAR_FABRIC_MMULT_ACCEL_CORE_TOP_0_INTERRUPT_INTR parameters.

 

I'm considering to use the old Vivado HLS 2012.4 release (the original proposed on the XAPP1170), but I believe there is a more elegant solution.

 

Any other suggestion/solution?

 

0 Kudos
Visitor bsilva
Visitor
10,675 Views
Registered: ‎01-21-2015

Re: Implementing xapp 1170 (Accelerator for Floating-Point matrix multiplication) in Vivado 2014.4 cant find some constants

Jump to solution

I found a way to make it run (using the files from solution http://zedboard.org/content/matrix-multiplication-vivado)

but I'm not sure if it is the right solution:

 

1.- Import all the files of the folder \arm_code

2.- Replace all the references to "platform.h"  to "./bck/platform.h"

3.- Define XPAR_FABRIC_MMULT_ACCEL_CORE_TOP_0_INTERRUPT_INTR to 0 since the HLS block interruption is not used.

4.- Define XPAR_MMULT_ACCEL_CORE_TOP_0_S_AXI_CONTROL_BUS_BASEADDR with the base address value that Vivado assing for the HLS block (in my case 0x43C00000).

 

It compiles and works in the board. Besides it does not look the best solution (since these values should be automatically generated) it seems to solve the problem.

 

Cheers!

View solution in original post

Observer jluisgt
Observer
6,294 Views
Registered: ‎10-22-2014

Re: Implementing xapp 1170 (Accelerator for Floating-Point matrix multiplication) in Vivado 2014.4 cant find some constants

Jump to solution

Hi bsilva, thanks for the sources.

 

Apparently in Vivado the XPAR_FABRIC_MMULT_ACCEL_CORE_TOP_0_INTERRUPT_INTR constant is named  XPAR_FABRIC_MMULT_ACCEL_CORE_0_INTERRUPT_INTR

 

The XPAR_MMULT_ACCEL_CORE_TOP_0_S_AXI_CONTROL_BUS_BASEADDR is named XPAR_MMULT_ACCEL_CORE_0_S_AXI_CONTROL_BUS_BASEADDR

 

It also run (after modifyin the XMmult_accel_core_LookupConfig funtion like this) 

 

XMmult_accel_core_Config *XMmult_accel_core_LookupConfig(u16 DeviceId) {
	XMmult_accel_core_Config *ConfigPtr = NULL;

	/*int Index;

	for (Index = 0; Index < XPAR_XMMULT_ACCEL_CORE_NUM_INSTANCES; Index++) {
		if (XMmult_accel_core_ConfigTable[Index].DeviceId == DeviceId) {
			ConfigPtr = &XMmult_accel_core_ConfigTable[Index];
			break;
		}
	}*/
	////////Direct assignation of Control_bus_BaseAddress
	XMmult_accel_core_ConfigTable[0].Control_bus_BaseAddress = XPAR_MMULT_ACCEL_CORE_0_S_AXI_CONTROL_BUS_BASEADDR;
	ConfigPtr = &XMmult_accel_core_ConfigTable[0];
	////////////////////////////////////////////////////////////////////////////////

	return ConfigPtr;
}

 It's also not elegant but works... by the way we have to eliminate the extern from //extern XMmult_accel_core_Config XMmult_accel_core_ConfigTable[];

 

Now am trying to optimize the matrix multiplication in Vivado HLS. Have you any idea where to find the directives mentioned in the xapp1170 (for the 8 solutions)?

 

0 Kudos
Visitor bsilva
Visitor
6,029 Views
Registered: ‎01-21-2015

Re: Implementing xapp 1170 (Accelerator for Floating-Point matrix multiplication) in Vivado 2014.4 cant find some constants

Jump to solution

Hi jluisgt,

 

Thanks for your reply. I found your solution quite intersting.

 

Regarding the solution 8 mentioned in the xapp1170, the C++ source code already includes all pragmas with the directives for that particular solution.

0 Kudos