問題タブ [zynq]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
2 に答える
1925 参照

vhdl - Zynq を使用して SD カードにデータを書き込む

ZedBoard (Xilinx Zynq FPGA を搭載) を使用してアプリケーションを開発しています。ボードは複数の SD カードに接続されます。1 枚の SD カードを使用して、FPGA のブートとプログラムを行います (ここでは問題ありません)。それが終わると、FPGA は何らかのデータ処理を行い、SDIO プロトコルを使用して 2 番目の SD カードに内容を書き込む必要があります。VHDL ロジックを直接使用して SD カードにデータを書き込む方法、または AXI4 - DMA を使用して PS を介してデータを書き込む方法を示す有用なドキュメント/チュートリアルなどには遭遇しませんでした。また、SD カードの読み取り/書き込みアクセス用の無料のザイリンクスまたはサード パーティの IP ブロックもありません。誰かがこれに関するヒント/ヘルプを提供してもらえますか?

ありがとう。

0 投票する
1 に答える
314 参照

arm - ARM Cortex A9 のコア数

Zynq チップを搭載した Zedboard を使用しています。CPUあたりのコア数を知りたいです(ボードにはCPU0とCPU1の2つがありますが、コア数の表示はありません!)。ありがとう。

0 投票する
1 に答える
2027 参照

xilinx - AMP (Asymmetric Multiple Processing) モードでの Zynq の使用

Zynq を AMP モードで使用するアプリケーション ノート XAPP 1078 や XAPP 1079 などがあります。

このアプリケーション ノートでは、リポジトリ sdk_repo を使用して、standalone-amp テンプレートで FSBL を設定します。

通常の「Zynq-FSBL」テンプレートと変更された「Zynq FSBL for AMP」テンプレートの違いを教えてください。

前もって感謝します

0 投票する
1 に答える
1197 参照

zynq - ザイリンクス SDK で Petalinux BSP を作成できない

UG978 ドキュメントに記載されている手順に従ってザイリンクス SDK で Petalinux BSP をビルドしようとしていますが、次のエラーが発生します。

エラー:EDK - petalinux () - 「env(PETALINUX)」を読み取れません: そのような変数はありません

make: *** [ps7_cortexa9_0/lib/libxil.a] エラー 2

ERROR:EDK - DRC の実行中にエラーが発生しました。

make: エラーのため、ターゲット「all」は再作成されませんでした。

これらのエラーの理由は何ですか?? 前もって感謝します

0 投票する
1 に答える
9097 参照

vhdl - シンプルな axi lite スレーブ アプリケーション

Vivado 2015.3 と Zybo ボードを使用しており、PS から文字を受信して​​同じ値 +1 を返す非常に単純な AXI lite IP を実装しようとしています。

私は、IP 用に生成された vhdl ファイルが非常に単純だった (私の意見では) プランヘッドから切り替えたところ、この場合に役立つチュートリアルを見つけることができませんでした。

私の質問は、生成された 2 つの vhdl ファイル (my_ip_0_v1_0_S00_AXI および my_ip_0_v1_0) 内のどこに「+1」を追加する必要があるかということです。

ありがとう :)

my_ip_0_v1_0_S00_AXI.vhd :

my_ip_0_v1_0.vhd :

0 投票する
3 に答える
1004 参照

vhdl - VHDL - 合成結果がビヘイビアと同じではない

Newton 法を使用して sqrt を計算する VHDL でプログラムを作成する必要があります。大丈夫だと思われるコードを書きましたが、機能しません。ビヘイビアー シミュレーションでは適切な出力値が得られますが、合成後 (およびハードウェアで起動) では得られません。プログラムはステートマシンとして実装されました。入力値は整数 (使用される形式は std_logic_vector) で、出力は固定小数点です (計算目的で入力値に 64^2 を掛けたので、出力値の LSB ビットは小数部になります)。
関数を使用して、vhdlguru blogspot から vhdl を分割しました。ビヘイビア シミュレーションでは、sqrt の計算に約 350 ns (Tclk=10 ns) かかりますが、合成後は 50 ns しかかかりません。

使用コード:

以下のビヘイビアおよび合成後のシミュレーション結果のスクリーンショット:

行動シミュレーション

合成後のシミュレーション

私は VHDL の経験がほとんどなく、問題を解決するために何ができるかわかりません。計算用の他のプロセスを除外しようとしましたが、うまくいきませんでした。

あなたが私を助けてくれることを願っています。プラットフォーム: Zynq ZedBoard IDE: Vivado 2014.4

よろしく、ミハル

0 投票する
4 に答える
2187 参照

linux-kernel - Need help mapping pre-reserved **cacheable** DMA buffer on Xilinx/ARM SoC (Zynq 7000)

I've got a Xilinx Zynq 7000-based board with a peripheral in the FPGA fabric that has DMA capability (on an AXI bus). We've developed a circuit and are running Linux on the ARM cores. We're having performance problems accessing a DMA buffer from user space after it's been filled by hardware.

Summary:

We have pre-reserved at boot time a section of DRAM for use as a large DMA buffer. We're apparently using the wrong APIs to map this buffer, because it appears to be uncached, and the access speed is terrible.

Using it even as a bounce-buffer is untenably slow due to horrible performance. IIUC, ARM caches are not DMA coherent, so I would really appreciate some insight on how to do the following:

  1. Map a region of DRAM into the kernel virtual address space but ensure that it is cacheable.
  2. Ensure that mapping it into userspace doesn't also have an undesirable effect, even if that requires we provide an mmap call by our own driver.
  3. Explicitly invalidate a region of physical memory from the cache hierarchy before doing a DMA, to ensure coherency.

More info:

I've been trying to research this thoroughly before asking. Unfortunately, this being an ARM SoC/FPGA, there's very little information available on this, so I have to ask the experts directly.

Since this is an SoC, a lot of stuff is hard-coded for u-boot. For instance, the kernel and a ramdisk are loaded to specific places in DRAM before handing control over to the kernel. We've taken advantage of this to reserve a 64MB section of DRAM for a DMA buffer (it does need to be that big, which is why we pre-reserve it). There isn't any worry about conflicting memory types or the kernel stomping on this memory, because the boot parameters tell the kernel what region of DRAM it has control over.

Initially, we tried to map this physical address range into kernel space using ioremap, but that appears to mark the region uncacheable, and the access speed is horrible, even if we try to use memcpy to make it a bounce buffer. We use /dev/mem to map this also into userspace, and I've timed memcpy as being around 70MB/sec.

Based on a fair amount of searching on this topic, it appears that although half the people out there want to use ioremap like this (which is probably where we got the idea from), ioremap is not supposed to be used for this purpose and that there are DMA-related APIs that should be used instead. Unfortunately, it appears that DMA buffer allocation is totally dynamic, and I haven't figured out how to tell it, "here's a physical address already allocated -- use that."

One document I looked at is this one, but it's way too x86 and PC-centric: https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt

And this question also comes up at the top of my searches, but there's no real answer: get the physical address of a buffer under Linux

Looking at the standard calls, dma_set_mask_and_coherent and family won't take a pre-defined address and wants a device structure for PCI. I don't have such a structure, because this is an ARM SoC without PCI. I could manually populate such a structure, but that smells to me like abusing the API, not using it as intended.

BTW: This is a ring buffer, where we DMA data blocks into different offsets, but we align to cache line boundaries, so there is no risk of false sharing.

Thank you a million for any help you can provide!

UPDATE: It appears that there's no such thing as a cacheable DMA buffer on ARM if you do it the normal way. Maybe if I don't make the ioremap call, the region won't be marked as uncacheable, but then I have to figure out how to do cache management on ARM, which I can't figure out. One of the problems is that memcpy in userspace appears to really suck. Is there a memcpy implementation that's optimized for uncached memory I can use? Maybe I could write one. I have to figure out if this processor has Neon.

0 投票する
1 に答える
1187 参照

fpga - Zynq7/Zedboard: DRAM からの読み出し時に Xil_in32 がデータを変更する

PL (FPGA) で次のように設定された Zedboard があります。

カスタム AXI (フル) マスター -> インターコネクト -> Zynq_PS (HP0 スレーブ ポート)

  • カスタム AXI マスターがデータを生成します (0x00000000 から始まる DRAM に書き込まれた単純なカウンター)。
  • データは DRAM に書き込まれます (XMD コンソールによると -> mrd 0x00000000 10)
  • PS がデータを読み込もうとすると (main.c -> "Xil_in32(0x00000000)" を呼び出す)、データが変更されます!!!

質問 : 関数 Xil_in32 (DRAM からデータを読み取るため) を呼び出すと、特定の状況でデータ自体が変更されますか? (いつ、なぜ?)

Xil_in32 が呼び出されない限り、データは変更されません。これは、main.c から Xil_in32 を呼び出す前に XMD コンソールからデータを読み取ることによって証明されます。

C コード:

XMD 読み取りデータ: これは、メモリの読み取りを停止した場所を示し、カウンターは続行します。