用紫光的FPGA器件时,当进行联合仿真调试时,会出现下图问题:Failed to find ‘GRS_INST‘ in hierarchical name ‘/GRS_INST/GRSNET‘

紫光PDS与modelsim联合调试问题:用紫光的FPGA器件时,当进行联合仿真调试时,会出现下图问题:

Failed to find 'GRS_INST' in hierarchical name '/GRS_INST/GRSNET'

解决该问题只需要在仿真的激励文件中加入一段代码即可,如下所示(可直接复制使用):

//###############################

//GTP_GRS

//###############################

reg grs_n;

GTP_GRS GRS_INST(

.GRS_N (grs_n)

);

initial begin

grs_n = 1'b0;

#5000 grs_n = 1'b1;

end

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
geodetic_to_gauss_trans(double lon, double lat, int zone_mode, double custom_longitude) { if ((lon >= -180 && lon <= 180) && (lat >= -90 && lat <= 90) && (zone_mode == -1 || zone_mode == 0 || zone_mode == 1) && (custom_longitude >= -180 && custom_longitude <= 180)) { switch (zone_mode) { case 1: if (lon >= 1.5) { zone_ = int((lon + 1.5) / 3); central_meridian_ = zone_ * 3; } if (lon < 1.5) { zone_ = int((lon + 1.5) / 3) + 120; central_meridian_ = zone_ * 3 - 360; } break; case -1: if (lon >= 0) { zone_ = int(lon / 6) + 1; central_meridian_ = zone_ * 6 - 3; } if (lon < 0) { zone_ = int(lon / 6) + 60; central_meridian_ = (zone_ * 6 - 3) - 360; } break; case 0: central_meridian_ = custom_longitude; break; } } else { x_ = 0; y_ = 0; return false; } std::string proj_string = "+proj=tmerc +lat_0=0 +lon_0=central_meridian +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs"; std::string to_replace = "central_meridian"; std::string replace_with = std::to_string(central_meridian_); size_t pos = proj_string.find(to_replace); proj_string.replace(pos, to_replace.length(), replace_with); PJ_CONTEXT *C = proj_context_create(); PJ *P = proj_create(C, proj_string.c_str()); PJ *G = proj_crs_get_geodetic_crs(C, P); PJ_AREA *A = nullptr; const char *const *options = nullptr; PJ *G2P = proj_create_crs_to_crs_from_pj(C, G, P, A, options); PJ_COORD c_in{}; c_in.lpzt.z = 0.0; c_in.lpzt.t = HUGE_VAL; c_in.lp.lam = lon; c_in.lp.phi = lat; PJ_COORD c_out = proj_trans(G2P, PJ_FWD, c_in); x_ = c_out.enu.n; y_ = c_out.enu.e; // PJ_COORD c_inv = proj_trans(G2P, PJ_DIRECTION::PJ_INV, c_out); std::cout.precision(20); std::cout << std::fixed; std::cout << x_ << "," << y_ << std::endl; std::cout << std::fixed << c_inv.lp.lam << "," << c_inv.lp.phi << std::endl; proj_destroy(P); proj_destroy(G); proj_destroy(G2P); proj_context_destroy(C); return true; }
06-10

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值