Commit Graph

126 Commits (7da98277821dff950871b3a8cafa6b2b789da7ed)

Author SHA1 Message Date
Istvan Csomortani 9441f00f5f adi_ip: Define the default driver value to 0 for unused ports 2018-08-06 10:14:48 +03:00
Laszlo Nagy e794d04cd1 axi_dmac: renamed .h files to .vh
Vivado recognises .h files as C header files,
the expected extension for Verilog Header is .vh
This causes issues in simulating block designs  since these files
won't be exported for the simulation even if they are
part of the simulation fileset.
2018-07-11 11:30:22 +03:00
Laszlo Nagy 7713738d12 axi_dmac: ttcl file support for simulation
When creating a block design targeted for simulation, in the testbench
it is useful to know the parameters of the sub components (e.g DMAC)
Xilinx's way to pass the parameters to the testbench in case of it's AXI
verification IP is through package files. We will do the same for the DMAC.

The package file can be generated from template files (ttcl).
These will be added only to the simulation file set of the project and
won't affect synthesis.
2018-07-11 11:30:22 +03:00
Lars-Peter Clausen 6baf7612f7 ad_ip_alt.tcl: ad_ip_addfile: Add support for header files
Handle files with a .h suffix and add them as VERILOG_INCLUDE to the file
list.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-05-03 14:49:06 +02:00
Laszlo Nagy a3cd70ff1d adi_ip.tcl: reorder synthesis files in the file group
This commit fixes the following warning from the IP packaging flow:
"[IP_Flow 19-801] The last file in file group "Synthesis" should be an HDL file:
"axi_dmac_constr.ttcl".  During generation the IP Flow uses the last file to
determine library and other information when generating the top wrapper file.
If possible, please make sure that non-HDL files are located earlier in the list
of files for this file group."

Having the ttcl or other non HDL file at the end of the file group causes issues
when the project preferred language is set to VHDL. Since the synthesis file group
is set to "xilinx_anylanguagesynthesis" the tool tries to guess the type of wrapper
to be generated for that IP based on the last file from the file group.
If the file is non HDL then he defaults to the preferred language (this case VHDL)

Due some issue when the tool tries to create a VHDL wrapper for an IP that has
a Verilog top file with boolean parameters set from the IP packager he fails.
After we reorder the files after each non HDL file addition
he will create a correct Verilog wrapper for it with all parameters
which can be integrated in a VHDL system top file without issues.
2018-04-24 11:46:52 +03:00
Lars-Peter Clausen 1ea3ad28ae Add quiet mode to the Makefile system
The standard Makefile output is very noisy and it can be difficult to
filter the interesting information from this noise.

In quiet mode the standard Makefile output will be suppressed and instead a
short human readable description of the current task is shown.

E.g.
	> make adv7511.zed
	Building axi_clkgen library [library/axi_clkgen/axi_clkgen_ip.log] ... OK
	Building axi_hdmi_tx library [library/axi_hdmi_tx/axi_hdmi_tx_ip.log] ... OK
	Building axi_i2s_adi library [library/axi_i2s_adi/axi_i2s_adi_ip.log] ... OK
	Building axi_spdif_tx library [library/axi_spdif_tx/axi_spdif_tx_ip.log] ... OK
	Building util_i2c_mixer library [library/util_i2c_mixer/util_i2c_mixer_ip.log] ... OK
	Building adv7511_zed project [projects/adv7511/zed/adv7511_zed_vivado.log] ... OK

Quiet mode is enabled by default since it generates a more human readable
output. It can be disabled by passing VERBOSE=1 to make or setting the
VERBOSE environment variable to 1 before calling make.

E.g.
	> make adv7511.zed VERBOSE=1
	make[1]: Entering directory 'library/axi_clkgen'
	rm -rf *.cache *.data *.xpr *.log component.xml *.jou xgui
	*.ip_user_files *.srcs *.hw *.sim .Xil .timestamp_altera
	vivado -mode batch -source axi_clkgen_ip.tcl >> axi_clkgen_ip.log 2>&1
	...

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 2b914d33c1 Move Altera IP core dependency tracking to library Makefiles
Currently the individual IP core dependencies are tracked inside the
library Makefile for Xilinx IPs and the project Makefiles only reference
the IP cores.

For Altera on the other hand the individual dependencies are tracked inside
the project Makefile. This leads to a lot of duplicated lists and also
means that the project Makefiles need to be regenerated when one of the IP
cores changes their files.

Change the Altera projects to a similar scheme than the Xilinx projects.
The projects themselves only reference the library as a whole as their
dependency while the library Makefile references the individual source
dependencies.

Since on Altera there is no target that has to be generated create a dummy
target called ".timestamp_altera" who's only purpose is to have a timestamp
that is greater or equal to the timestamp of all of the IP core files. This
means the project Makefile can have a dependency on this file and make sure
that the project will be rebuild if any of the files in the library
changes.

This patch contains quite a bit of churn, but hopefully it reduces the
amount of churn in the future when modifying Altera IP cores.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 89ad5f7836 Makefile: Change IP component dependency to component definition file
Currently the IP component dependency in the Makefile system is the Vivado
project file. The project file is only a intermediary product in producing
the IP component definition file.

If building the component definition file fails or the process is aborted
half way through it is possible that the Vivado project file for the IP
component exists, but the IP component definition file does not.

In this case there will be no attempt to build the IP component definition
file when building a project that has a dependency on the IP component.
Building the project will fail in this case.

To avoid this update the Makefile rules so that the IP component definition
file is used as the dependency. In this case the IP component will be
re-build if the component definition file does not exist, even if the
project file exists.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Lars-Peter Clausen 2b108c63db Add common library Makefile
The library Makefiles for share most of their code.  The only difference is
the list of project dependencies.

Create a file that has the common parts and can be included
by the library Makefiles.

This drastically reduces the size of the library Makefiles and also allows
to change the Makefile implementation without having to re-generate all
Makefiles.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2018-04-11 15:09:54 +03:00
Adrian Costina 8234ba1029 scripts:adi_ip: Update web address format
Change format for web address so that IP GUI considers it valid
2018-04-11 15:09:54 +03:00
Istvan Csomortani 7c04e36656 scripts: Message severity changes on Vivado
Vivado sometimes generates semi-valid or invalid warnings and critical warnings.
In the past these messages were silenced, by changing its message severity.
These setups were scattered in multiple scripts. This commit is an attempt
to centralize it and make it more maintainable and easier to review it.
2018-04-11 15:09:54 +03:00
Istvan Csomortani 47e95fc4a9 scripts: Update tools for the next release
The next supported tool versions are:
  + Vivado 2017.4.1
  + Quartus 17.1
2018-04-11 15:09:54 +03:00
Matt Fornero e8bab0b45f adi_env: Normalize environment variables
If the ADI_HDL_DIR or ADI_PHDL_DIR are set on Windows platforms, an
invalid TCL character (e.g. backslash) may be used as a file separator,
causing issues with the build / library scripts.

Normalize the paths before using them as global TCL variables.
2017-10-23 12:15:14 +01:00
Lars-Peter Clausen 27d243ad14 adi_ip_alt.tcl: ad_ip_parameter: Allow to specify additional properties
Allow to specify additional properties when defining a IP parameter. The
properties take the form of a list of key value pairs. E.g.

ad_ip_parameter ... { \
  DISPLAY_NAME "Name" \
  DISPLAY_HINT "radio" \
}

This helps to reduce the amount of boilerplate when additional properties
need to be specified for a parameter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:05:16 +02:00
Lars-Peter Clausen 9bf852fff2 adi_ip_alt.tcl: Allow to add TCL files to the fileset
TCL files can be helpful to automate certain tasks like creating timing
constraints. Add handling for them to the ad_ip_addfile function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-21 11:05:16 +02:00
Lars-Peter Clausen 7a04b4723b adi_ip_alt.tcl: ad_ip_intf_s_axi: Allow to specify AXI interface address width
The address width of the AXI interface depends on the size of the register
and can differ from peripheral to peripheral. Add a parameter to the
function that allows to specify the address width, this allows to use the
function for more peripherals.

Keep the current value of 16 bits as the default if the parameter is not
specified.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-24 15:21:52 +02:00
Rejeesh Kutty 513f6ae18a adi_ip.tcl- general rule- order independent constraints 2017-06-16 13:51:35 -04:00
Rejeesh Kutty 9e2d55ed07 adi_ip_alt: allow composition only parameter settings 2017-06-15 11:36:39 -04:00
Rejeesh Kutty 95c446a41d adi_ip- initialize xdc list when ip is created 2017-06-01 15:49:18 -04:00
Lars-Peter Clausen ed23eb950e adi_ip.pl: adi_ip_properties_lite: Set core name to the specified name
Currently the name of the newly created IP core is automatically inferred
from the top-level module. This works fine if there is only one top-level
IP. But for an IP core that is a collection of helper modules this fails.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-05-23 11:16:07 +02:00
Lars-Peter Clausen 19636e8c55 adi_ip.tcl: adi_add_bus_clock: Set polarity depending on the reset name suffix
Currently the polarity of the reset signal is always set to negative.
Change this so that the polarity is selected on the suffix of the name. If
it ends with a 'n' or 'N' the polarity will be negative, otherwise it will
be positive.

This allows this function to be used with reset signals that have positive
polarity.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-05-23 11:16:07 +02:00
Lars-Peter Clausen 341a695163 adi_ip.pl: Add support for creating multi busses
This patch adds a helper function that allows to create multiple ports for
a single set of underlying signals. This is useful when the number of ports
is a configuration parameter. It sort of allows the emulation of port
arrays without having to have on set of input/output signals for each port,
instead the signals are shared by all ports.

The following snippet illustrates how this can for example be used to
generate multiple AXI-Streaming ports from a single set of signals.

<verilog>
	module #(
		parameter NUM_PORTS = 2
	) (
		input [NUM_PORTS*32-1:0] data,
		input [NUM_PORTS-1:0] valid,
		output [NUM_PORTS-1:0] ready,
	);
	...
	endmodule
</verilog>

<tcl>
	adi_add_multi_bus 8 "data" "slave" \
		"xilinx.com:interface:axis_rtl:1.0" \
		"xilinx.com:interface:axis:1.0" \
		[list \
			{ "data" "TDATA" 32} \
			{ "valid" "TVALID" 1} \
			{ "ready" "TREADY" 1} \
	  ] \
	  "NUM_PORTS > {i})"
</tcl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-05-23 11:16:07 +02:00
Lars-Peter Clausen e4a4a7a1b8 adi_ip.tcl: Set processing order of IP core constraint files back to late
Commit 2f023437b4 ("adi_ip- remove adi_ip_constraints") changed the
default processing order of IP core constraint files from late to normal.

This is problematic because some IP core constraint files try to access
clocks that are that are generated by different files with the normal
processing order level. These clock may or may not be available to the IP
core constraint file depending on the (random) order in which the files
were processed.

To avoid this issue change the default processing order back to late.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-05-23 11:16:07 +02:00
Lars-Peter Clausen 55cc5515ad adi_ip.tcl: Use analog.com for interface vendor
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-05-23 11:16:07 +02:00
Rejeesh Kutty 828c2406cb adi-ip-alt allow changing device family 2017-05-17 16:13:26 -04:00
AndreiGrozav 70e3dd00ff scripts: Update required tool versions 2017-05-17 16:45:20 +03:00
Rejeesh Kutty ecfa15bfce version check- change to critical warning 2017-05-12 09:51:48 -04:00
Lars-Peter Clausen 9f382d56c6 scripts/adi_ip.pl: Infer register map range from address width
Currently the register map range of a peripheral is hardcoded to 64k. Not
all peripherals need that much space though and reducing the size of the
address can reduce the amount of logic required, both in the interconnect
as well as in the peripheral.

Let adi_ip_properties() infer the size of the register map from the number
of bits of the address when creating the register map.

For backwards compatibility limit the register map size to 64k since
currently peripherals have a address width of 32 bits, event if they use
less.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-04-18 12:17:40 +02:00
Lars-Peter Clausen f869ac9ed2 scripts/adi_ip.tcl: adi_set_ports_dependency(): Allow to specify tie-off value
Typically when a port has a enablement dependency it also should have a
tie-off value to the port is connected to when disabled.

Make it possible to specify this tie-off value when calling
adi_set_ports_dependency().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2017-04-18 12:17:40 +02:00
Rejeesh Kutty 2f023437b4 adi_ip- remove adi_ip_constraints 2017-04-02 10:42:51 -04:00
Rejeesh Kutty d916697263 adi_ip- a little rearrangement 2017-04-01 09:04:35 -04:00
Istvan Csomortani 1d448f0013 adi_ip: Set up SCOPE_TO_REF for xdc and save the core 2017-03-29 18:40:24 +03:00
Istvan Csomortani a7bd4e6e82 scripts/adi_ip: Update the adi_ip_properties process
- Add a process, which automaticaly infer AXI memory mapped
interfaces (adi_ip_infer_mm_interfaces)
  - Add missign line breaks to the 'set_propery supported_families'
command
  - Fix the deletion of pre-infered memory maps
2017-01-19 15:06:47 +02:00
Istvan Csomortani b59549053c scripts/adi_ip: Fix adi_ip_infer_interfaces process
This patch is a complementary fix of 8b8c37 patch. And fix
all the 'infer interface' issues.

The adi_ip_infer_interfaces process was renamed to
adi_ip_infer_streaming_interfaces. Now the process just do
what its name suggest.

Affected cores were axi_dmac, axi_spdif_rx, axi_spdif_tx, axi_i2s_adi
and axi_usb_fx3. All these cores scripts were updated.
2017-01-12 12:15:33 +02:00
Istvan Csomortani 977e6d9189 adi_ip_alt: Fix some typo 2016-12-06 15:24:21 +02:00
Istvan Csomortani 8b8c37e2e2 scripts/adi_ip: Remove AXIMM inference from adi_ip_infer_interfaces
The AXI Memory Map interface is infered in the adi_ip_properties process.
Infer it again in the adi_ip_infer_interfaces brakes the flow,
the tool will not find the cell's address segment, so there will not be
any address space assigned to the AXI interface.
Affected cores were axi_i2s_adi and axi_spdif_tx.
2016-12-05 14:33:39 +02:00
Rejeesh Kutty 9f4c5f8060 arradio/ad9361- updates 2016-10-31 15:34:32 -04:00
Rejeesh Kutty cc75fa3dfe altera- java/tcl mess handling 2016-10-31 10:54:07 -04:00
Rejeesh Kutty a9d03af771 altera- serdes changes 2016-10-28 14:09:18 -04:00
Istvan Csomortani aa46de5e5e adi_ip_alt: Add ad_generate_module_inst proc
Add a tcl process, which can be used to generate custom module
names during the generation phase. This will be used to create
different ad_serdes_clk module, in case when independent IOPLLs are
needed for TX and RX.
2016-10-24 11:43:00 +03:00
Istvan Csomortani ecc0addb8c scripts/adi_ip_alt.tcl: Script is case insensitive for its arguments 2016-10-18 11:25:06 +03:00
Rejeesh Kutty e9105faae1 library/scripts- add beta devices 2016-09-30 11:55:10 -04:00
Rejeesh Kutty c6998dd396 scripts- altera conduit 2016-09-12 14:57:50 -04:00
Rejeesh Kutty 7988d2c7a2 adi_ip: remove duplicated errored auto address maps & interfaces 2016-07-29 12:32:19 -04:00
Shrutika Redkar 3384d384d3 hdl-vivado-2016.2- infer bus interfaces separately 2016-07-28 13:44:57 -04:00
Istvan Csomortani 341b7badee library/scripts: Remove all autogenerated interface in adi_ip_properties_lite
There are a few IP, which is configured by using just the adi_ip_properties_lite
process, therefor the remove_all_bus_interface will be called in the end of that
process, to make sure that all the autogenerated interfaces are deleted during the
IP properties setup.
2016-06-10 15:08:05 +03:00
Rejeesh Kutty aadb220a3f zcu102- updates 2016-05-10 15:40:41 -04:00
AndreiGrozav 31cc91d1b9 adi_ip: Updated to 2014.4.2
- automatically infer clocks, resets, axim_mm and axis interfaces
2016-03-14 15:14:18 +02:00
Lars-Peter Clausen 19f7d8500c adi_ip.tcl: Add support for adding bd files to a core
bd files can be used to automate certain tasks in IP integrator when the
core is instantiated. Add a helper command for adding such files to a core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-09-18 15:27:14 +02:00
Lars-Peter Clausen 0f5f21eec2 adi_ip.tcl: Add helper function to add TTCL files to a core
Add a helper function which allows to add TTCL templates files to a core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-09-18 15:27:10 +02:00
Rejeesh Kutty 4655af7bf6 2015.2 updates 2015-08-26 11:33:44 -04:00
Istvan Csomortani db18924f8a library/scripts: Fix ipx::get_file_groups process call
ipx::get_file_groups does not work, if there is specified just a [<pattern>] for its argument. Need to use a -filter to get proper result.
2015-08-20 10:56:37 +03:00
Istvan Csomortani 0dfb3e2019 tcl_scripts: Update Vivado version number to 2015.2.1 2015-08-20 10:50:52 +03:00
Rejeesh Kutty 6eb0b5eeda scripts-- add interface procedures 2015-08-14 15:33:58 -04:00
Rejeesh Kutty 2b8e1bdb74 adi_ip- parse file list for constraints 2015-08-13 13:03:51 -04:00
Rejeesh Kutty 264f9ffbfc ip_alt- avalon/reset definitions 2015-07-21 10:55:13 -04:00
Rejeesh Kutty 9d95ddc620 reset and clock additions 2015-07-09 14:29:08 -04:00
Lars-Peter Clausen cefbe3a0ff scripts/adi_ip.tcl: Add option to specify reset interface direction
Allow to specify the direction of the reset signal for a interface, this is
useful if the core itself generates the reset signal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-05-21 17:21:35 +02:00
Rejeesh Kutty da0409b5a6 library- qsys components 2015-05-20 11:51:50 -04:00
Rejeesh Kutty d48d3f4aa3 scripts/ip-alt- added 2015-05-20 09:11:18 -04:00
Adrian Costina bd06bae8c2 library: Modified the adi_ip.tcl script
The constraints processing order changed to "late" instead of "early", in order for all the clocks in the system to be already created when the IP constraints are applied
2015-04-23 14:31:23 +03:00
Lars-Peter Clausen bfd84edc46 adi_ip.tcl: adi_ip_constraints: Add support for VHDL projects
Match both xilinx_verilogsynthesis and xilinx_vhdlsynthesis when getting the
file group.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-04-16 17:48:28 +02:00
Lars-Peter Clausen c9206433b5 adi_ip.tcl: Allow to specify processing order for adi_ip_constraints
In order to be able to use get_clocks in a constraint file the constraint
file needs to run after the constraint file that creates the clock. Allow to
specify the processing order when adding a constraint file to a core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-04-15 17:20:15 +02:00
Lars-Peter Clausen 8a47d0f94b adi_ip: Add helper function to add dependency to a IP core
Add a helper function that allows to add dependencies to IP cores to the
current IP core, this makes it possible to use a module from the other IP
without having to add the file itself to the current core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-04-08 15:52:41 +02:00
Lars-Peter Clausen 88abf98bd6 adi_env.tcl: Make default ad_hdl_dir path detection more robust
Instead of using a path relative to the current working directory use a path
relative to the location of the adi_env.tcl script.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-04-08 14:43:56 +02:00
Lars-Peter Clausen 11cc18be79 adi_ip.tcl: Initialize ip_repo_paths
Initialize ip_repo_paths so that when building a peripheral we have access to the interface definitions stored in the repository.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-04-08 13:29:25 +02:00
Lars-Peter Clausen d17cd22ef1 adi_ip.tcl: Allow to directly specify the vlnv string for adi_add_bus()
Modify the adi_add_bus() function to take the full vlnv strings instead of just the bus type.

This makes the function more flexible and e.g. allows to handle buses from other vendors.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2015-04-08 13:29:25 +02:00
Istvan Csomortani 6995f63134 Add version check to adi_ip.tcl too. 2015-03-05 11:55:09 +02:00
Rejeesh Kutty 6edcaa478a adi_ip: updates for 2014.4 2015-02-19 11:11:39 -05:00
Lars-Peter Clausen 58cbe1813d scripts/adi_ip: Add helper function to create bus clock and reset interface
Add a helper function that can be used to register a clock and a reset interface for the clock and reset signals of a bus.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2014-10-10 16:11:31 +03:00
Lars-Peter Clausen 41cc92ef49 Remove BASEADDR/HIGHADDR parameters
This is unused and unneeded. The AXI interconnect will make sure that a
peripheral only gets requests that are meant for it, there is no need to
check the address in the peripheral itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2014-09-11 12:26:37 +02:00
Rejeesh Kutty 1396a215e5 library: local constraints 2014-08-14 15:09:47 -04:00
Rejeesh Kutty ef60cce15e kcu105: added 2014-04-30 14:41:40 -04:00
Istvan Csomortani ba484999b3 Fix default value of $ad_hdl_dir and $ad_phdl_dir 2014-03-12 18:18:47 +02:00
Rejeesh Kutty ff5021b1a8 pointers to directories 2014-02-28 16:57:19 -05:00
Rejeesh Kutty f7c9368abc initial checkin 2014-02-28 14:26:22 -05:00