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
Did you mean:
564 Views
Registered: ‎01-09-2018

## Instantiation in Verilog (Test bench file) for a block design - Vivado

Where is the instantiation list of the block?

It is not working with the list I found in design_1.bd under "components"

1 Solution

Accepted Solutions
Highlighted
468 Views
Registered: ‎01-09-2018

## Re: Instantiation of a block from the block design - Vivado

I suppose it is not possible to instantiate the blocks?

so here the alternative I found doing it in html/ javascript,

here some code I use hope it helps (I included something to convert decimals and binaries or to do some padding:

just copy whats from <html> to </html> into a notepad and save as test.html or any other name and open it in a browser

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>
<script>
var i;

var text = "`timescale 1ns / 1ps<br>";
text += "// " + etad + " <br>";

for (i = 0; i < 20; i += 1) {
text += "wire [7:0] D"+i+";"+ " <br>";
text += "assign D"+i+"[7:0] = ledx["+(7+i*8)+":"+(i*8)+"];"+ " <br>";
text += "assign swx["+(7+i*8)+":"+(i*8)+"] = DB[7:0];"+ " <br>"; }

text += "module test( swx, ledx); <br><br>";
text += "input [7:0] swx; <br>";
text += "output [7:0] ledx;<br>";
text += "endmodule ";

document.getElementById("demo").innerHTML = text;

function dec2bin(dec) {
return dec.toString(2);
}

return Array(Math.max(digits - String(dec2bin(number)).length + 1, 0)).join(0) + dec2bin(number);
}

/*function exportToCsv() {
var myCsv = "Col1,Col2,Col3\nval1,val2,val3";

window.open('data&colon;text/csv;charset=utf-8,' + escape(myCsv));
}

var button = document.getElementById('b');

*/

</script>
</body>

</html>

4 Replies
551 Views
Registered: ‎01-09-2018

## Re: Instantiation of a block from the block design - Vivado

1. I right clicked the block and chosed create hierarchy to push it one deeper

2. I ctrl click the design blocks that have Input/Outputs

3. I select the "Make External" so it wired the pins to the top layer

4. I wait 10-30 min for Vivado to write the files

5. open \project_1\project_1.srcs\sources_1\bd\design_1\design_1.bd

That file gives the instantiation list "component ..."

I am now trying to instanciate the block for a verilog file I am writing as test bench

where is the the instatiation for the block from the block design, I want to write a verilog test bench

477 Views
Registered: ‎01-09-2018

## Re: Instantiation of a block from the block design - Vivado

Can I converty a block into verilog (like was possible for ISE)?

Highlighted
469 Views
Registered: ‎01-09-2018

## Re: Instantiation of a block from the block design - Vivado

I suppose it is not possible to instantiate the blocks?

so here the alternative I found doing it in html/ javascript,

here some code I use hope it helps (I included something to convert decimals and binaries or to do some padding:

just copy whats from <html> to </html> into a notepad and save as test.html or any other name and open it in a browser

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>
<script>
var i;

var text = "`timescale 1ns / 1ps<br>";
text += "// " + etad + " <br>";

for (i = 0; i < 20; i += 1) {
text += "wire [7:0] D"+i+";"+ " <br>";
text += "assign D"+i+"[7:0] = ledx["+(7+i*8)+":"+(i*8)+"];"+ " <br>";
text += "assign swx["+(7+i*8)+":"+(i*8)+"] = DB[7:0];"+ " <br>"; }

text += "module test( swx, ledx); <br><br>";
text += "input [7:0] swx; <br>";
text += "output [7:0] ledx;<br>";
text += "endmodule ";

document.getElementById("demo").innerHTML = text;

function dec2bin(dec) {
return dec.toString(2);
}

return Array(Math.max(digits - String(dec2bin(number)).length + 1, 0)).join(0) + dec2bin(number);
}

/*function exportToCsv() {
var myCsv = "Col1,Col2,Col3\nval1,val2,val3";

window.open('data&colon;text/csv;charset=utf-8,' + escape(myCsv));
}

var button = document.getElementById('b');

*/

</script>
</body>

</html>

370 Views
Registered: ‎01-09-2018