- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Is there a VHDL string compare function included in the tool, and if so what library must be included? I'm trying to generate different code depending on which Altera FPGA I'm targeting. Perhaps also/instead there is a dedicated function for determining the current family by setting a variable in the code or project?
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
there is no way to use different libraries depending on any string.
You can use generics to control the instatiation of different components depending on device family. There is no way of auto-collecting the device family. You have to set this yourself via a constant. You might be able to pick it up from Quartus via TCL and modify the constant/generic - but my TCL isnt very good. As for string compare, you can just use an equals (remember its case sensitive):
cyclone_gen : if family = "CYCLONE" generate
...
end generate cyclone_gen;
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thank you, that is pretty much exactly what I was looking for. I was a bit confused because in our Xilinx projects here they seem to use some libary function equalsIgnoreCase and I didn't know if I would have to do the same. For me ignoring case isn't that important.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
that function will be to cancel out people putting in "CycloNE" or something as a generic. The function probably converts both strings to lower case then does an
if string1 = string2 then return true;