1extern crate libc;
6
7#[repr(C)]
8pub struct CIrValue {
9 _private: [u8; 0], }
11
12#[repr(C)]
13pub struct CIrBits {
14 _private: [u8; 0], }
16
17#[repr(C)]
18pub struct CBitsRope {
19 _private: [u8; 0], }
21
22#[repr(C)]
23pub struct CIrPackage {
24 _private: [u8; 0], }
26
27#[repr(C)]
28pub struct CIrFunction {
29 _private: [u8; 0], }
31
32#[repr(C)]
33pub struct CIrFunctionBase {
34 _private: [u8; 0], }
36
37#[repr(C)]
38pub struct CIrFunctionJit {
39 _private: [u8; 0], }
41
42#[repr(C)]
43pub struct CTraceMessage {
44 pub message: *mut std::os::raw::c_char,
45 pub verbosity: i64,
46}
47
48#[repr(C)]
49pub struct CIrType {
50 _private: [u8; 0], }
52
53#[repr(C)]
54pub struct CIrFunctionType {
55 _private: [u8; 0], }
57
58#[repr(C)]
60pub struct CVastFile {
61 _private: [u8; 0], }
63
64#[repr(C)]
65pub struct CVastModule {
66 _private: [u8; 0], }
68
69#[repr(C)]
70pub struct CVastDataType {
71 _private: [u8; 0], }
73
74#[repr(C)]
75pub struct CVastExpression {
76 _private: [u8; 0], }
78
79#[repr(C)]
80pub struct CVastLiteral {
81 _private: [u8; 0], }
83
84#[repr(C)]
85pub struct CVastConcat {
86 _private: [u8; 0], }
88
89#[repr(C)]
90pub struct CVastComment {
91 _private: [u8; 0], }
93
94#[repr(C)]
95pub struct CVastBlankLine {
96 _private: [u8; 0], }
98
99#[repr(C)]
100pub struct CVastInlineVerilogStatement {
101 _private: [u8; 0], }
103
104#[repr(C)]
105pub struct CVastLogicRef {
106 _private: [u8; 0], }
108
109#[repr(C)]
110pub struct CVastInstantiation {
111 _private: [u8; 0], }
113
114#[repr(C)]
115pub struct CVastContinuousAssignment {
116 _private: [u8; 0], }
118
119#[repr(C)]
120pub struct CVastSlice {
121 _private: [u8; 0], }
123
124#[repr(C)]
125pub struct CVastIndex {
126 _private: [u8; 0], }
128
129#[repr(C)]
130pub struct CVastIndexableExpression {
131 _private: [u8; 0], }
133
134#[repr(C)]
135pub struct CVastAlwaysBase {
136 _private: [u8; 0], }
138
139#[repr(C)]
140pub struct CVastStatementBlock {
141 _private: [u8; 0], }
143
144#[repr(C)]
145pub struct CVastStatement {
146 _private: [u8; 0], }
148
149#[repr(C)]
150pub struct CVastConditional {
151 _private: [u8; 0], }
153
154#[repr(C)]
155pub struct CVastCaseStatement {
156 _private: [u8; 0], }
158
159#[repr(C)]
160pub struct CVastParameterRef {
161 _private: [u8; 0], }
163
164#[repr(C)]
165pub struct CVastLocalparamRef {
166 _private: [u8; 0], }
168
169#[repr(C)]
172pub struct CDslxImportData {
173 _private: [u8; 0], }
175
176#[repr(C)]
177pub struct CDslxTypecheckedModule {
178 _private: [u8; 0], }
180
181#[repr(C)]
182pub struct CDslxModule {
183 _private: [u8; 0], }
185
186#[repr(C)]
187pub struct CDslxTypeInfo {
188 _private: [u8; 0], }
190
191#[repr(C)]
192pub struct CDslxStructDef {
193 _private: [u8; 0], }
195
196#[repr(C)]
197pub struct CDslxEnumDef {
198 _private: [u8; 0], }
200
201#[repr(C)]
202pub struct CDslxTypeAlias {
203 _private: [u8; 0], }
205
206#[repr(C)]
207pub struct CDslxType {
208 _private: [u8; 0], }
210
211#[repr(C)]
212pub struct CDslxTypeDim {
213 _private: [u8; 0], }
215
216#[repr(C)]
217pub struct CDslxExpr {
218 _private: [u8; 0], }
220
221#[repr(C)]
222pub struct CDslxInterpValue {
223 _private: [u8; 0], }
225
226#[repr(C)]
227pub struct CDslxParametricEnv {
228 _private: [u8; 0], }
230
231#[repr(C)]
232pub struct CDslxEnumMember {
233 _private: [u8; 0], }
235
236#[repr(C)]
237pub struct CDslxStructMember {
238 _private: [u8; 0], }
240
241#[repr(C)]
242pub struct CDslxTypeAnnotation {
243 _private: [u8; 0], }
245
246#[repr(C)]
247pub struct CDslxTypeRefTypeAnnotation {
248 _private: [u8; 0], }
250
251#[repr(C)]
252pub struct CDslxTypeRef {
253 _private: [u8; 0], }
255
256#[repr(C)]
257pub struct CDslxImport {
258 _private: [u8; 0], }
260
261#[repr(C)]
262pub struct CDslxColonRef {
263 _private: [u8; 0], }
265
266#[repr(C)]
267pub struct CDslxTypeDefinition {
268 _private: [u8; 0], }
270
271#[repr(C)]
272pub struct CDslxConstantDef {
273 _private: [u8; 0], }
275
276#[repr(C)]
277pub struct CDslxModuleMember {
278 _private: [u8; 0], }
280
281#[repr(C)]
282pub struct CDslxFunction {
283 _private: [u8; 0], }
285
286#[repr(C)]
287pub struct CDslxParam {
288 _private: [u8; 0], }
290
291#[repr(C)]
292pub struct CDslxCallGraph {
293 _private: [u8; 0], }
295
296#[repr(C)]
297pub struct CDslxQuickcheck {
298 _private: [u8; 0], }
300
301#[repr(C)]
302pub struct CScheduleAndCodegenResult {
303 _private: [u8; 0], }
305
306#[repr(C)]
307pub struct CIrBuilderBase {
308 _private: [u8; 0], }
310
311#[repr(C)]
312pub struct CIrBValue {
313 _private: [u8; 0], }
315
316#[repr(C)]
317pub struct CIrFunctionBuilder {
318 _private: [u8; 0], }
320
321pub type XlsFormatPreference = i32;
322pub type XlsValueKind = i32;
323
324pub type XlsCallingConvention = i32;
326
327pub type CVastFileType = i32;
328
329pub type VastOperatorKind = i32;
330
331pub type VastDataKind = i32;
333pub const XLS_VAST_DATA_KIND_REG: VastDataKind = 0;
334pub const XLS_VAST_DATA_KIND_WIRE: VastDataKind = 1;
335pub const XLS_VAST_DATA_KIND_LOGIC: VastDataKind = 2;
336pub const XLS_VAST_DATA_KIND_INTEGER: VastDataKind = 3;
337pub const XLS_VAST_DATA_KIND_INT: VastDataKind = 4;
338pub const XLS_VAST_DATA_KIND_USER: VastDataKind = 5;
339pub const XLS_VAST_DATA_KIND_UNTYPED_ENUM: VastDataKind = 6;
340pub const XLS_VAST_DATA_KIND_GENVAR: VastDataKind = 7;
341
342pub type DslxTypeDefinitionKind = i32;
343
344pub type DslxModuleMemberKind = i32;
345
346pub const XLS_CALLING_CONVENTION_TYPICAL: XlsCallingConvention = 0;
347pub const XLS_CALLING_CONVENTION_IMPLICIT_TOKEN: XlsCallingConvention = 1;
348pub const XLS_CALLING_CONVENTION_PROC_NEXT: XlsCallingConvention = 2;
349
350#[repr(C)]
351pub struct XlsDslxParametricEnvItem {
352 pub identifier: *const std::os::raw::c_char,
353 pub value: *const CDslxInterpValue,
354}
355
356#[repr(C)]
357pub struct CDslxInvocationRewriteRule {
358 pub from_callee: *mut CDslxFunction,
359 pub to_callee: *mut CDslxFunction,
360 pub match_callee_env: *const CDslxParametricEnv,
361 pub to_callee_env: *const CDslxParametricEnv,
362}
363
364extern "C" {
365 pub fn xls_convert_dslx_to_ir(
366 dslx: *const std::os::raw::c_char,
367 path: *const std::os::raw::c_char,
368 module_name: *const std::os::raw::c_char,
369 dslx_stdlib_path: *const std::os::raw::c_char,
370 additional_search_paths: *const *const std::os::raw::c_char,
371 additional_search_paths_count: libc::size_t,
372 error_out: *mut *mut std::os::raw::c_char,
373 ir_out: *mut *mut std::os::raw::c_char,
374 ) -> bool;
375
376 pub fn xls_convert_dslx_to_ir_with_warnings(
377 dslx: *const std::os::raw::c_char,
378 path: *const std::os::raw::c_char,
379 module_name: *const std::os::raw::c_char,
380 dslx_stdlib_path: *const std::os::raw::c_char,
381 additional_search_paths: *const *const std::os::raw::c_char,
382 additional_search_paths_count: libc::size_t,
383 enable_warnings: *const *const std::os::raw::c_char,
384 enable_warnings_count: libc::size_t,
385 disable_warnings: *const *const std::os::raw::c_char,
386 disable_warnings_count: libc::size_t,
387 warnings_as_errors: bool,
388 force_implicit_token_calling_convention: bool,
389 warnings_out: *mut *mut *mut std::os::raw::c_char,
390 warnings_out_count: *mut libc::size_t,
391 error_out: *mut *mut std::os::raw::c_char,
392 ir_out: *mut *mut std::os::raw::c_char,
393 ) -> bool;
394
395 pub fn xls_convert_dslx_path_to_ir(
396 path: *const std::os::raw::c_char,
397 dslx_stdlib_path: *const std::os::raw::c_char,
398 additional_search_paths: *const *const std::os::raw::c_char,
399 additional_search_paths_count: libc::size_t,
400 error_out: *mut *mut std::os::raw::c_char,
401 ir_out: *mut *mut std::os::raw::c_char,
402 ) -> bool;
403
404 pub fn xls_convert_dslx_path_to_ir_with_warnings(
405 path: *const std::os::raw::c_char,
406 dslx_stdlib_path: *const std::os::raw::c_char,
407 additional_search_paths: *const *const std::os::raw::c_char,
408 additional_search_paths_count: libc::size_t,
409 enable_warnings: *const *const std::os::raw::c_char,
410 enable_warnings_count: libc::size_t,
411 disable_warnings: *const *const std::os::raw::c_char,
412 disable_warnings_count: libc::size_t,
413 warnings_as_errors: bool,
414 force_implicit_token_calling_convention: bool,
415 warnings_out: *mut *mut *mut std::os::raw::c_char,
416 warnings_out_count: *mut libc::size_t,
417 error_out: *mut *mut std::os::raw::c_char,
418 ir_out: *mut *mut std::os::raw::c_char,
419 ) -> bool;
420
421 pub fn xls_parse_typed_value(
422 text: *const std::os::raw::c_char,
423 error_out: *mut *mut std::os::raw::c_char,
424 value_out: *mut *mut CIrValue,
425 ) -> bool;
426 pub fn xls_value_free(value: *mut CIrValue);
427
428 pub fn xls_value_clone(value: *const CIrValue) -> *mut CIrValue;
429
430 pub fn xls_value_get_bits(
432 value: *const CIrValue,
433 error_out: *mut *mut std::os::raw::c_char,
434 bits_out: *mut *mut CIrBits,
435 ) -> bool;
436
437 pub fn xls_value_make_tuple(
439 value_count: libc::size_t,
440 values: *const *const CIrValue,
441 ) -> *mut CIrValue;
442
443 pub fn xls_value_make_token() -> *mut CIrValue;
445
446 pub fn xls_value_make_array(
451 element_count: libc::size_t,
452 elements: *const *const CIrValue,
453 error_out: *mut *mut std::os::raw::c_char,
454 result_out: *mut *mut CIrValue,
455 ) -> bool;
456
457 pub fn xls_value_get_element(
460 tuple: *const CIrValue,
461 index: libc::size_t,
462 error_out: *mut *mut std::os::raw::c_char,
463 element_out: *mut *mut CIrValue,
464 ) -> bool;
465
466 pub fn xls_value_get_element_count(
467 value: *const CIrValue,
468 error_out: *mut *mut std::os::raw::c_char,
469 count_out: *mut i64,
470 ) -> bool;
471
472 pub fn xls_value_make_ubits(
474 bit_count: i64,
475 value: u64,
476 error_out: *mut *mut std::os::raw::c_char,
477 result_out: *mut *mut CIrValue,
478 ) -> bool;
479
480 pub fn xls_value_make_sbits(
482 bit_count: i64,
483 value: i64,
484 error_out: *mut *mut std::os::raw::c_char,
485 result_out: *mut *mut CIrValue,
486 ) -> bool;
487
488 pub fn xls_value_from_bits(bits: *const CIrBits) -> *mut CIrValue;
490
491 pub fn xls_bits_make_ubits(
492 bit_count: i64,
493 value: u64,
494 error_out: *mut *mut std::os::raw::c_char,
495 bits_out: *mut *mut CIrBits,
496 ) -> bool;
497
498 pub fn xls_bits_make_sbits(
499 bit_count: i64,
500 value: i64,
501 error_out: *mut *mut std::os::raw::c_char,
502 bits_out: *mut *mut CIrBits,
503 ) -> bool;
504
505 pub fn xls_bits_free(bits: *mut CIrBits);
506 pub fn xls_bits_get_bit_count(bits: *const CIrBits) -> i64;
507 pub fn xls_bits_get_bit(bits: *const CIrBits, index: i64) -> bool;
508 pub fn xls_bits_eq(bits: *const CIrBits, other: *const CIrBits) -> bool;
509 pub fn xls_bits_ne(a: *const CIrBits, b: *const CIrBits) -> bool;
510 pub fn xls_bits_ult(a: *const CIrBits, b: *const CIrBits) -> bool;
511 pub fn xls_bits_ule(a: *const CIrBits, b: *const CIrBits) -> bool;
512 pub fn xls_bits_ugt(a: *const CIrBits, b: *const CIrBits) -> bool;
513 pub fn xls_bits_uge(a: *const CIrBits, b: *const CIrBits) -> bool;
514 pub fn xls_bits_slt(a: *const CIrBits, b: *const CIrBits) -> bool;
515 pub fn xls_bits_sle(a: *const CIrBits, b: *const CIrBits) -> bool;
516 pub fn xls_bits_sgt(a: *const CIrBits, b: *const CIrBits) -> bool;
517 pub fn xls_bits_sge(a: *const CIrBits, b: *const CIrBits) -> bool;
518 pub fn xls_bits_to_debug_string(bits: *const CIrBits) -> *mut std::os::raw::c_char;
519 pub fn xls_bits_make_bits_from_bytes(
520 bit_count: libc::size_t,
521 bytes: *const u8,
522 byte_count: libc::size_t,
523 error_out: *mut *mut std::os::raw::c_char,
524 bits_out: *mut *mut CIrBits,
525 ) -> bool;
526 pub fn xls_mangle_dslx_name_full(
527 module_name: *const std::os::raw::c_char,
528 function_name: *const std::os::raw::c_char,
529 convention: XlsCallingConvention,
530 free_keys: *const *const std::os::raw::c_char,
531 free_keys_count: libc::size_t,
532 param_env: *const CDslxParametricEnv,
533 scope: *const std::os::raw::c_char,
534 error_out: *mut *mut std::os::raw::c_char,
535 mangled_out: *mut *mut std::os::raw::c_char,
536 ) -> bool;
537 pub fn xls_bits_add(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
538 pub fn xls_bits_sub(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
539 pub fn xls_bits_umul(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
540 pub fn xls_bits_smul(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
541 pub fn xls_bits_negate(bits: *const CIrBits) -> *mut CIrBits;
542 pub fn xls_bits_abs(bits: *const CIrBits) -> *mut CIrBits;
543 pub fn xls_bits_not(bits: *const CIrBits) -> *mut CIrBits;
544 pub fn xls_bits_and(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
545 pub fn xls_bits_or(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
546 pub fn xls_bits_xor(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
547
548 pub fn xls_bits_shift_left_logical(bits: *const CIrBits, shift_amount: i64) -> *mut CIrBits;
549 pub fn xls_bits_shift_right_logical(bits: *const CIrBits, shift_amount: i64) -> *mut CIrBits;
550 pub fn xls_bits_shift_right_arithmetic(bits: *const CIrBits, shift_amount: i64)
551 -> *mut CIrBits;
552
553 pub fn xls_bits_width_slice(bits: *const CIrBits, start: i64, width: i64) -> *mut CIrBits;
557
558 pub fn xls_bits_to_bytes(
559 bits: *const CIrBits,
560 error_out: *mut *mut std::os::raw::c_char,
561 bytes_out: *mut *mut u8,
562 byte_count_out: *mut libc::size_t,
563 ) -> bool;
564 pub fn xls_bytes_free(bytes: *mut u8);
565 pub fn xls_bits_to_uint64(
566 bits: *const CIrBits,
567 error_out: *mut *mut std::os::raw::c_char,
568 value_out: *mut u64,
569 ) -> bool;
570 pub fn xls_bits_to_int64(
571 bits: *const CIrBits,
572 error_out: *mut *mut std::os::raw::c_char,
573 value_out: *mut i64,
574 ) -> bool;
575
576 pub fn xls_create_bits_rope(bit_count: i64) -> *mut CBitsRope;
577 pub fn xls_bits_rope_append_bits(bits_rope: *mut CBitsRope, bits: *const CIrBits);
578 pub fn xls_bits_rope_get_bits(bits_rope: *mut CBitsRope) -> *mut CIrBits;
579 pub fn xls_bits_rope_free(bits_rope: *mut CBitsRope);
580
581 pub fn xls_package_free(package: *mut CIrPackage);
582 pub fn xls_c_str_free(c_str: *mut std::os::raw::c_char);
583 pub fn xls_c_strs_free(c_strs: *mut *mut std::os::raw::c_char, count: libc::size_t);
584 pub fn xls_value_to_string(
585 value: *const CIrValue,
586 str_out: *mut *mut std::os::raw::c_char,
587 ) -> bool;
588 pub fn xls_format_preference_from_string(
589 s: *const std::os::raw::c_char,
590 error_out: *mut *mut std::os::raw::c_char,
591 result_out: *mut XlsFormatPreference,
592 ) -> bool;
593
594 pub fn xls_value_to_string_format_preference(
595 value: *const CIrValue,
596 fmt: XlsFormatPreference,
597 error_out: *mut *mut std::os::raw::c_char,
598 str_out: *mut *mut std::os::raw::c_char,
599 ) -> bool;
600 pub fn xls_bits_to_string(
601 bits: *const CIrBits,
602 fmt: XlsFormatPreference,
603 include_bit_count: bool,
604 error_out: *mut *mut std::os::raw::c_char,
605 str_out: *mut *mut std::os::raw::c_char,
606 ) -> bool;
607
608 pub fn xls_value_get_kind(
609 value: *const CIrValue,
610 error_out: *mut *mut std::os::raw::c_char,
611 kind_out: *mut XlsValueKind,
612 ) -> bool;
613 pub fn xls_value_make_true() -> *mut CIrValue;
614 pub fn xls_value_make_false() -> *mut CIrValue;
615 pub fn xls_value_from_bits_owned(bits: *mut CIrBits) -> *mut CIrValue;
616 pub fn xls_value_flatten_to_bits(value: *const CIrValue) -> *mut CIrBits;
617
618 pub fn xls_value_eq(value: *const CIrValue, value: *const CIrValue) -> bool;
619 pub fn xls_parse_ir_package(
620 ir: *const std::os::raw::c_char,
621 filename: *const std::os::raw::c_char,
622 error_out: *mut *mut std::os::raw::c_char,
623 xls_package_out: *mut *mut CIrPackage,
624 ) -> bool;
625 pub fn xls_type_to_string(
626 t: *const CIrType,
627 error_out: *mut *mut std::os::raw::c_char,
628 result_out: *mut *mut std::os::raw::c_char,
629 ) -> bool;
630 pub fn xls_type_get_kind(
631 t: *mut CIrType,
632 error_out: *mut *mut std::os::raw::c_char,
633 kind_out: *mut XlsValueKind,
634 ) -> bool;
635 pub fn xls_type_get_flat_bit_count(t: *const CIrType) -> i64;
636 pub fn xls_type_get_leaf_count(t: *mut CIrType) -> i64;
637 pub fn xls_package_get_type_for_value(
638 package: *const CIrPackage,
639 value: *const CIrValue,
640 error_out: *mut *mut std::os::raw::c_char,
641 result_out: *mut *mut CIrType,
642 ) -> bool;
643 pub fn xls_package_get_function(
644 package: *const CIrPackage,
645 function_name: *const std::os::raw::c_char,
646 error_out: *mut *mut std::os::raw::c_char,
647 result_out: *mut *mut CIrFunction,
648 ) -> bool;
649 pub fn xls_package_get_functions(
650 package: *mut CIrPackage,
651 error_out: *mut *mut std::os::raw::c_char,
652 result_out: *mut *mut *mut CIrFunction,
653 count_out: *mut libc::size_t,
654 ) -> bool;
655 pub fn xls_function_ptr_array_free(function_pointer_array: *mut *mut CIrFunction);
656 pub fn xls_function_get_type(
657 function: *const CIrFunction,
658 error_out: *mut *mut std::os::raw::c_char,
659 xls_fn_type_out: *mut *mut CIrFunctionType,
660 ) -> bool;
661 pub fn xls_function_type_to_string(
662 t: *const CIrFunctionType,
663 error_out: *mut *mut std::os::raw::c_char,
664 string_out: *mut *mut std::os::raw::c_char,
665 ) -> bool;
666 pub fn xls_function_get_name(
667 function: *const CIrFunction,
668 error_out: *mut *mut std::os::raw::c_char,
669 name_out: *mut *mut std::os::raw::c_char,
670 ) -> bool;
671 pub fn xls_function_to_z3_smtlib(
672 function: *mut CIrFunction,
673 error_out: *mut *mut std::os::raw::c_char,
674 string_out: *mut *mut std::os::raw::c_char,
675 ) -> bool;
676 pub fn xls_interpret_function(
677 function: *const CIrFunction,
678 argc: libc::size_t,
679 args: *const *const CIrValue,
680 error_out: *mut *mut std::os::raw::c_char,
681 result_out: *mut *mut CIrValue,
682 ) -> bool;
683 pub fn xls_optimize_ir(
684 ir: *const std::os::raw::c_char,
685 top: *const std::os::raw::c_char,
686 error_out: *mut *mut std::os::raw::c_char,
687 ir_out: *mut *mut std::os::raw::c_char,
688 ) -> bool;
689 pub fn xls_mangle_dslx_name(
690 module_name: *const std::os::raw::c_char,
691 function_name: *const std::os::raw::c_char,
692 error_out: *mut *mut std::os::raw::c_char,
693 mangled_out: *mut *mut std::os::raw::c_char,
694 ) -> bool;
695 pub fn xls_init_xls(
696 usage: *const std::os::raw::c_char,
697 argc: libc::c_int,
698 argv: *mut *mut std::os::raw::c_char,
699 );
700 pub fn xls_package_to_string(
701 p: *const CIrPackage,
702 string_out: *mut *mut std::os::raw::c_char,
703 ) -> bool;
704 pub fn xls_package_get_top(p: *mut CIrPackage) -> *mut CIrFunctionBase;
705 pub fn xls_package_set_top_by_name(
706 p: *mut CIrPackage,
707 name: *const std::os::raw::c_char,
708 error_out: *mut *mut std::os::raw::c_char,
709 ) -> bool;
710
711 pub fn xls_verify_package(
712 p: *mut CIrPackage,
713 error_out: *mut *mut std::os::raw::c_char,
714 ) -> bool;
715
716 pub fn xls_make_function_jit(
717 function: *const CIrFunction,
718 error_out: *mut *mut std::os::raw::c_char,
719 result_out: *mut *mut CIrFunctionJit,
720 ) -> bool;
721 pub fn xls_function_jit_free(jit: *mut CIrFunctionJit);
722 pub fn xls_function_jit_run(
723 jit: *const CIrFunctionJit,
724 argc: libc::size_t,
725 args: *const *const CIrValue,
726 error_out: *mut *mut std::os::raw::c_char,
727 trace_messages_out: *mut *mut CTraceMessage,
728 trace_messages_count_out: *mut libc::size_t,
729 assert_messages_out: *mut *mut *mut std::os::raw::c_char,
730 assert_messages_count_out: *mut libc::size_t,
731 result_out: *mut *mut CIrValue,
732 ) -> bool;
733 pub fn xls_trace_messages_free(trace_messages: *mut CTraceMessage, count: libc::size_t);
734
735 pub fn xls_vast_make_verilog_file(file_type: CVastFileType) -> *mut CVastFile;
738 pub fn xls_vast_verilog_file_free(f: *mut CVastFile);
739 pub fn xls_vast_verilog_file_add_module(
740 f: *mut CVastFile,
741 name: *const std::os::raw::c_char,
742 ) -> *mut CVastModule;
743
744 pub fn xls_vast_verilog_file_make_scalar_type(f: *mut CVastFile) -> *mut CVastDataType;
746 pub fn xls_vast_verilog_file_make_bit_vector_type(
747 f: *mut CVastFile,
748 bit_count: i64,
749 is_signed: bool,
750 ) -> *mut CVastDataType;
751 pub fn xls_vast_verilog_file_make_bit_vector_type_expr(
752 f: *mut CVastFile,
753 width_expr: *mut CVastExpression,
754 is_signed: bool,
755 ) -> *mut CVastDataType;
756 pub fn xls_vast_verilog_file_make_integer_type(
757 f: *mut CVastFile,
758 is_signed: bool,
759 ) -> *mut CVastDataType;
760 pub fn xls_vast_verilog_file_make_int_type(
761 f: *mut CVastFile,
762 is_signed: bool,
763 ) -> *mut CVastDataType;
764 pub fn xls_vast_verilog_file_make_integer_def(
765 f: *mut CVastFile,
766 name: *const std::os::raw::c_char,
767 is_signed: bool,
768 ) -> *mut CVastDef;
769 pub fn xls_vast_verilog_file_make_int_def(
770 f: *mut CVastFile,
771 name: *const std::os::raw::c_char,
772 is_signed: bool,
773 ) -> *mut CVastDef;
774 pub fn xls_vast_verilog_file_make_extern_package_type(
775 f: *mut CVastFile,
776 package_name: *const std::os::raw::c_char,
777 type_name: *const std::os::raw::c_char,
778 ) -> *mut CVastDataType;
779 pub fn xls_vast_verilog_file_make_packed_array_type(
780 f: *mut CVastFile,
781 element_type: *mut CVastDataType,
782 dims: *const i64,
783 dim_count: libc::size_t,
784 ) -> *mut CVastDataType;
785
786 pub fn xls_vast_data_type_width_as_int64(
788 type_: *mut CVastDataType,
789 out_width: *mut i64,
790 error_out: *mut *mut std::os::raw::c_char,
791 ) -> bool;
792
793 pub fn xls_vast_data_type_flat_bit_count_as_int64(
794 type_: *mut CVastDataType,
795 out_flat_bit_count: *mut i64,
796 error_out: *mut *mut std::os::raw::c_char,
797 ) -> bool;
798
799 pub fn xls_vast_data_type_width(type_: *mut CVastDataType) -> *mut CVastExpression;
801
802 pub fn xls_vast_data_type_is_signed(type_: *mut CVastDataType) -> bool;
803
804 pub fn xls_vast_verilog_file_make_continuous_assignment(
805 f: *mut CVastFile,
806 lhs: *mut CVastExpression,
807 rhs: *mut CVastExpression,
808 ) -> *mut CVastContinuousAssignment;
809
810 pub fn xls_vast_verilog_file_make_concat(
811 f: *mut CVastFile,
812 expressions: *mut *mut CVastExpression,
813 expression_count: libc::size_t,
814 ) -> *mut CVastExpression;
815
816 pub fn xls_vast_verilog_file_make_replicated_concat(
817 f: *mut CVastFile,
818 replication: *mut CVastExpression,
819 elements: *mut *mut CVastExpression,
820 element_count: libc::size_t,
821 ) -> *mut CVastConcat;
822
823 pub fn xls_vast_verilog_file_make_replicated_concat_i64(
824 f: *mut CVastFile,
825 replication_count: i64,
826 elements: *mut *mut CVastExpression,
827 element_count: libc::size_t,
828 ) -> *mut CVastConcat;
829
830 pub fn xls_vast_verilog_file_make_slice_i64(
831 f: *mut CVastFile,
832 subject: *mut CVastIndexableExpression,
833 hi: i64,
834 lo: i64,
835 ) -> *mut CVastSlice;
836 pub fn xls_vast_verilog_file_make_slice(
837 f: *mut CVastFile,
838 subject: *mut CVastIndexableExpression,
839 hi: *mut CVastExpression,
840 lo: *mut CVastExpression,
841 ) -> *mut CVastSlice;
842
843 pub fn xls_vast_verilog_file_make_index(
844 f: *mut CVastFile,
845 subject: *mut CVastIndexableExpression,
846 index: *mut CVastExpression,
847 ) -> *mut CVastIndex;
848 pub fn xls_vast_verilog_file_make_index_i64(
849 f: *mut CVastFile,
850 subject: *mut CVastIndexableExpression,
851 index: i64,
852 ) -> *mut CVastIndex;
853
854 pub fn xls_vast_verilog_file_make_unary(
855 f: *mut CVastFile,
856 arg: *mut CVastExpression,
857 op: VastOperatorKind,
858 ) -> *mut CVastExpression;
859
860 pub fn xls_vast_verilog_file_make_binary(
861 f: *mut CVastFile,
862 lhs: *mut CVastExpression,
863 rhs: *mut CVastExpression,
864 op: VastOperatorKind,
865 ) -> *mut CVastExpression;
866
867 pub fn xls_vast_verilog_file_make_ternary(
868 f: *mut CVastFile,
869 cond: *mut CVastExpression,
870 then_expr: *mut CVastExpression,
871 else_expr: *mut CVastExpression,
872 ) -> *mut CVastExpression;
873
874 pub fn xls_vast_verilog_file_make_instantiation(
875 f: *mut CVastFile,
876 module_name: *const std::os::raw::c_char,
877 instance_name: *const std::os::raw::c_char,
878 parameter_port_names: *const *const std::os::raw::c_char,
879 parameter_expressions: *const *const CVastExpression,
880 parameter_count: libc::size_t,
881 connection_port_names: *const *const std::os::raw::c_char,
882 connection_expressions: *const *const CVastExpression,
883 connection_count: libc::size_t,
884 ) -> *mut CVastInstantiation;
885 pub fn xls_vast_verilog_file_make_comment(
886 f: *mut CVastFile,
887 text: *const std::os::raw::c_char,
888 ) -> *mut CVastComment;
889 pub fn xls_vast_verilog_file_make_blank_line(f: *mut CVastFile) -> *mut CVastBlankLine;
890 pub fn xls_vast_verilog_file_make_inline_verilog_statement(
891 f: *mut CVastFile,
892 text: *const std::os::raw::c_char,
893 ) -> *mut CVastInlineVerilogStatement;
894 pub fn xls_vast_verilog_file_make_literal(
895 f: *mut CVastFile,
896 bits: *const CIrBits,
897 format_preference: XlsFormatPreference,
898 emit_bit_count: bool,
899 error_out: *mut *mut std::os::raw::c_char,
900 literal_out: *mut *mut CVastLiteral,
901 ) -> bool;
902 pub fn xls_vast_verilog_file_make_plain_literal(
903 f: *mut CVastFile,
904 value: i32,
905 ) -> *mut CVastLiteral;
906
907 pub fn xls_vast_verilog_module_add_parameter_port(
909 m: *mut CVastModule,
910 name: *const std::os::raw::c_char,
911 rhs: *mut CVastExpression,
912 ) -> *mut CVastLogicRef;
913 pub fn xls_vast_verilog_module_add_typed_parameter_port(
914 m: *mut CVastModule,
915 name: *const std::os::raw::c_char,
916 type_: *mut CVastDataType,
917 rhs: *mut CVastExpression,
918 ) -> *mut CVastLogicRef;
919 pub fn xls_vast_verilog_module_add_input(
920 m: *mut CVastModule,
921 name: *const std::os::raw::c_char,
922 type_: *mut CVastDataType,
923 ) -> *mut CVastLogicRef;
924 pub fn xls_vast_verilog_module_add_output(
925 m: *mut CVastModule,
926 name: *const std::os::raw::c_char,
927 type_: *mut CVastDataType,
928 ) -> *mut CVastLogicRef;
929 pub fn xls_vast_verilog_module_add_logic_input(
930 m: *mut CVastModule,
931 name: *const std::os::raw::c_char,
932 type_: *mut CVastDataType,
933 ) -> *mut CVastLogicRef;
934 pub fn xls_vast_verilog_module_add_logic_output(
935 m: *mut CVastModule,
936 name: *const std::os::raw::c_char,
937 type_: *mut CVastDataType,
938 ) -> *mut CVastLogicRef;
939 pub fn xls_vast_verilog_module_add_wire(
940 m: *mut CVastModule,
941 name: *const std::os::raw::c_char,
942 type_: *mut CVastDataType,
943 ) -> *mut CVastLogicRef;
944 pub fn xls_vast_verilog_module_add_member_instantiation(
945 m: *mut CVastModule,
946 inst: *mut CVastInstantiation,
947 );
948 pub fn xls_vast_verilog_module_add_member_continuous_assignment(
949 m: *mut CVastModule,
950 ca: *mut CVastContinuousAssignment,
951 );
952 pub fn xls_vast_verilog_module_add_member_comment(
953 m: *mut CVastModule,
954 comment: *mut CVastComment,
955 );
956 pub fn xls_vast_verilog_module_add_member_blank_line(
957 m: *mut CVastModule,
958 blank: *mut CVastBlankLine,
959 );
960 pub fn xls_vast_verilog_module_add_member_inline_statement(
961 m: *mut CVastModule,
962 stmt: *mut CVastInlineVerilogStatement,
963 );
964
965 pub fn xls_vast_verilog_module_add_parameter(
966 m: *mut CVastModule,
967 name: *const std::os::raw::c_char,
968 rhs: *mut CVastExpression,
969 ) -> *mut CVastParameterRef;
970
971 pub fn xls_vast_verilog_module_add_localparam(
972 m: *mut CVastModule,
973 name: *const std::os::raw::c_char,
974 rhs: *mut CVastExpression,
975 ) -> *mut CVastLocalparamRef;
976
977 pub fn xls_vast_verilog_file_make_def(
978 f: *mut CVastFile,
979 name: *const std::os::raw::c_char,
980 kind: VastDataKind,
981 type_: *mut CVastDataType,
982 ) -> *mut CVastDef;
983
984 pub fn xls_vast_verilog_module_add_parameter_with_def(
985 m: *mut CVastModule,
986 def: *mut CVastDef,
987 rhs: *mut CVastExpression,
988 ) -> *mut CVastParameterRef;
989
990 pub fn xls_vast_verilog_module_add_localparam_with_def(
991 m: *mut CVastModule,
992 def: *mut CVastDef,
993 rhs: *mut CVastExpression,
994 ) -> *mut CVastLocalparamRef;
995
996 pub fn xls_vast_verilog_module_get_name(m: *mut CVastModule) -> *mut std::os::raw::c_char;
997
998 pub fn xls_vast_logic_ref_as_indexable_expression(
1000 v: *mut CVastLogicRef,
1001 ) -> *mut CVastIndexableExpression;
1002 pub fn xls_vast_index_as_indexable_expression(
1003 v: *mut CVastIndex,
1004 ) -> *mut CVastIndexableExpression;
1005
1006 pub fn xls_vast_literal_as_expression(v: *mut CVastLiteral) -> *mut CVastExpression;
1007 pub fn xls_vast_concat_as_expression(v: *mut CVastConcat) -> *mut CVastExpression;
1008 pub fn xls_vast_logic_ref_as_expression(v: *mut CVastLogicRef) -> *mut CVastExpression;
1009 pub fn xls_vast_slice_as_expression(v: *mut CVastSlice) -> *mut CVastExpression;
1010 pub fn xls_vast_index_as_expression(v: *mut CVastIndex) -> *mut CVastExpression;
1011 pub fn xls_vast_parameter_ref_as_expression(v: *mut CVastParameterRef) -> *mut CVastExpression;
1012 pub fn xls_vast_localparam_ref_as_expression(
1013 v: *mut CVastLocalparamRef,
1014 ) -> *mut CVastExpression;
1015 pub fn xls_vast_verilog_file_make_unsized_one_literal(
1016 f: *mut CVastFile,
1017 ) -> *mut CVastExpression;
1018 pub fn xls_vast_verilog_file_make_unsized_zero_literal(
1019 f: *mut CVastFile,
1020 ) -> *mut CVastExpression;
1021 pub fn xls_vast_verilog_file_make_unsized_x_literal(f: *mut CVastFile) -> *mut CVastExpression;
1022
1023 pub fn xls_vast_logic_ref_get_name(v: *mut CVastLogicRef) -> *mut std::os::raw::c_char;
1024
1025 pub fn xls_vast_verilog_file_add_include(f: *mut CVastFile, path: *const std::os::raw::c_char);
1026 pub fn xls_vast_verilog_file_emit(f: *const CVastFile) -> *mut std::os::raw::c_char;
1027
1028 pub fn xls_dslx_import_data_create(
1031 dslx_stdlib_path: *const std::os::raw::c_char,
1032 additional_search_paths: *const *const std::os::raw::c_char,
1033 additional_search_paths_count: libc::size_t,
1034 ) -> *mut CDslxImportData;
1035 pub fn xls_dslx_import_data_free(data: *mut CDslxImportData);
1036
1037 pub fn xls_dslx_parse_and_typecheck(
1038 text: *const std::os::raw::c_char,
1039 path: *const std::os::raw::c_char,
1040 module_name: *const std::os::raw::c_char,
1041 import_data: *const CDslxImportData,
1042 error_out: *mut *mut std::os::raw::c_char,
1043 typechecked_module_out: *mut *mut CDslxTypecheckedModule,
1044 ) -> bool;
1045
1046 pub fn xls_dslx_replace_invocations_in_module(
1047 tm: *mut CDslxTypecheckedModule,
1048 callers: *const *mut CDslxFunction,
1049 callers_count: libc::size_t,
1050 rules: *const CDslxInvocationRewriteRule,
1051 rules_count: libc::size_t,
1052 import_data: *mut CDslxImportData,
1053 install_subject: *const std::os::raw::c_char,
1054 error_out: *mut *mut std::os::raw::c_char,
1055 result_out: *mut *mut CDslxTypecheckedModule,
1056 ) -> bool;
1057
1058 pub fn xls_schedule_and_codegen_package(
1063 p: *mut CIrPackage,
1064 scheduling_options_flags_proto: *const std::os::raw::c_char,
1065 codegen_flags_proto: *const std::os::raw::c_char,
1066 with_delay_model: bool,
1067 error_out: *mut *mut std::os::raw::c_char,
1068 result_out: *mut *mut CScheduleAndCodegenResult,
1069 ) -> bool;
1070
1071 pub fn xls_schedule_and_codegen_result_get_verilog_text(
1072 result: *mut CScheduleAndCodegenResult,
1073 ) -> *mut std::os::raw::c_char;
1074
1075 pub fn xls_schedule_and_codegen_result_free(result: *mut CScheduleAndCodegenResult);
1076
1077 pub fn xls_dslx_typechecked_module_free(module: *mut CDslxTypecheckedModule);
1078
1079 pub fn xls_dslx_typechecked_module_get_module(
1080 module: *mut CDslxTypecheckedModule,
1081 ) -> *mut CDslxModule;
1082
1083 pub fn xls_dslx_typechecked_module_get_type_info(
1084 module: *mut CDslxTypecheckedModule,
1085 ) -> *mut CDslxTypeInfo;
1086
1087 pub fn xls_dslx_module_get_name(module: *const CDslxModule) -> *mut std::os::raw::c_char;
1088
1089 pub fn xls_dslx_module_get_type_definition_count(module: *const CDslxModule) -> i64;
1090
1091 pub fn xls_dslx_module_get_member_count(module: *const CDslxModule) -> i64;
1092
1093 pub fn xls_dslx_module_get_member(module: *const CDslxModule, i: i64)
1094 -> *mut CDslxModuleMember;
1095
1096 pub fn xls_dslx_module_get_type_definition_kind(
1097 module: *const CDslxModule,
1098 i: i64,
1099 ) -> DslxTypeDefinitionKind;
1100
1101 pub fn xls_dslx_module_get_type_definition_as_struct_def(
1102 module: *const CDslxModule,
1103 i: i64,
1104 ) -> *mut CDslxStructDef;
1105 pub fn xls_dslx_module_get_type_definition_as_enum_def(
1106 module: *const CDslxModule,
1107 i: i64,
1108 ) -> *mut CDslxEnumDef;
1109 pub fn xls_dslx_module_get_type_definition_as_type_alias(
1110 module: *const CDslxModule,
1111 i: i64,
1112 ) -> *mut CDslxTypeAlias;
1113
1114 pub fn xls_dslx_module_member_get_kind(
1116 member: *const CDslxModuleMember,
1117 ) -> DslxModuleMemberKind;
1118 pub fn xls_dslx_module_member_get_constant_def(
1119 member: *const CDslxModuleMember,
1120 ) -> *mut CDslxConstantDef;
1121 pub fn xls_dslx_module_member_get_type_alias(
1122 member: *const CDslxModuleMember,
1123 ) -> *mut CDslxTypeAlias;
1124 pub fn xls_dslx_module_member_get_struct_def(
1125 member: *const CDslxModuleMember,
1126 ) -> *mut CDslxStructDef;
1127 pub fn xls_dslx_module_member_get_enum_def(
1128 member: *const CDslxModuleMember,
1129 ) -> *mut CDslxEnumDef;
1130
1131 pub fn xls_dslx_colon_ref_get_attr(
1132 colon_ref: *const CDslxColonRef,
1133 ) -> *mut std::os::raw::c_char;
1134
1135 pub fn xls_dslx_type_info_get_type_struct_def(
1136 type_info: *mut CDslxTypeInfo,
1137 node: *mut CDslxStructDef,
1138 ) -> *mut CDslxType;
1139 pub fn xls_dslx_type_info_get_type_enum_def(
1140 type_info: *mut CDslxTypeInfo,
1141 node: *mut CDslxEnumDef,
1142 ) -> *mut CDslxType;
1143 pub fn xls_dslx_type_info_get_type_struct_member(
1144 type_info: *mut CDslxTypeInfo,
1145 member: *mut CDslxStructMember,
1146 ) -> *mut CDslxType;
1147 pub fn xls_dslx_type_info_get_type_type_alias(
1148 type_info: *mut CDslxTypeInfo,
1149 node: *mut CDslxTypeAlias,
1150 ) -> *mut CDslxType;
1151 pub fn xls_dslx_type_info_get_type_constant_def(
1152 type_info: *mut CDslxTypeInfo,
1153 node: *mut CDslxConstantDef,
1154 ) -> *mut CDslxType;
1155
1156 pub fn xls_dslx_type_info_get_type_type_annotation(
1158 type_info: *mut CDslxTypeInfo,
1159 type_annotation: *mut CDslxTypeAnnotation,
1160 ) -> *mut CDslxType;
1161
1162 pub fn xls_dslx_type_info_get_imported_type_info(
1163 type_info: *mut CDslxTypeInfo,
1164 module: *mut CDslxModule,
1165 ) -> *mut CDslxTypeInfo;
1166
1167 pub fn xls_dslx_type_info_build_function_call_graph(
1169 type_info: *mut CDslxTypeInfo,
1170 error_out: *mut *mut std::os::raw::c_char,
1171 result_out: *mut *mut CDslxCallGraph,
1172 ) -> bool;
1173
1174 pub fn xls_dslx_call_graph_free(call_graph: *mut CDslxCallGraph);
1175
1176 pub fn xls_dslx_call_graph_get_function_count(call_graph: *mut CDslxCallGraph) -> i64;
1177
1178 pub fn xls_dslx_call_graph_get_function(
1179 call_graph: *mut CDslxCallGraph,
1180 index: i64,
1181 ) -> *mut CDslxFunction;
1182
1183 pub fn xls_dslx_call_graph_get_callee_count(
1184 call_graph: *mut CDslxCallGraph,
1185 caller: *mut CDslxFunction,
1186 ) -> i64;
1187
1188 pub fn xls_dslx_call_graph_get_callee_function(
1189 call_graph: *mut CDslxCallGraph,
1190 caller: *mut CDslxFunction,
1191 callee_index: i64,
1192 ) -> *mut CDslxFunction;
1193
1194 pub fn xls_dslx_constant_def_get_name(
1197 constant_def: *const CDslxConstantDef,
1198 ) -> *mut std::os::raw::c_char;
1199
1200 pub fn xls_dslx_constant_def_get_value(constant_def: *const CDslxConstantDef)
1201 -> *mut CDslxExpr;
1202
1203 pub fn xls_dslx_type_alias_get_identifier(
1206 type_alias: *const CDslxTypeAlias,
1207 ) -> *mut std::os::raw::c_char;
1208
1209 pub fn xls_dslx_type_alias_get_type_annotation(
1210 type_alias: *const CDslxTypeAlias,
1211 ) -> *mut CDslxTypeAnnotation;
1212
1213 pub fn xls_dslx_type_annotation_get_type_ref_type_annotation(
1216 type_annotation: *const CDslxTypeAnnotation,
1217 ) -> *mut CDslxTypeRefTypeAnnotation;
1218
1219 pub fn xls_dslx_type_ref_get_type_definition(
1222 type_ref: *const CDslxTypeRef,
1223 ) -> *mut CDslxTypeDefinition;
1224
1225 pub fn xls_dslx_import_get_subject_count(import: *const CDslxImport) -> i64;
1228 pub fn xls_dslx_import_get_subject(
1229 import: *const CDslxImport,
1230 i: i64,
1231 ) -> *mut std::os::raw::c_char;
1232
1233 pub fn xls_dslx_colon_ref_resolve_import_subject(
1236 colon_ref: *const CDslxColonRef,
1237 ) -> *mut CDslxImport;
1238
1239 pub fn xls_dslx_type_definition_get_colon_ref(
1242 type_definition: *const CDslxTypeDefinition,
1243 ) -> *mut CDslxColonRef;
1244 pub fn xls_dslx_type_definition_get_type_alias(
1245 type_definition: *const CDslxTypeDefinition,
1246 ) -> *mut CDslxTypeAlias;
1247
1248 pub fn xls_dslx_type_ref_type_annotation_get_type_ref(
1251 type_ref_type_annotation: *const CDslxTypeRefTypeAnnotation,
1252 ) -> *mut CDslxTypeRef;
1253
1254 pub fn xls_dslx_struct_def_get_identifier(
1257 struct_def: *const CDslxStructDef,
1258 ) -> *mut std::os::raw::c_char;
1259
1260 pub fn xls_dslx_struct_def_is_parametric(struct_def: *const CDslxStructDef) -> bool;
1261
1262 pub fn xls_dslx_struct_def_get_member_count(struct_def: *const CDslxStructDef) -> i64;
1263
1264 pub fn xls_dslx_struct_def_get_member(
1265 struct_def: *const CDslxStructDef,
1266 i: i64,
1267 ) -> *mut CDslxStructMember;
1268
1269 pub fn xls_dslx_struct_member_get_name(
1270 member: *const CDslxStructMember,
1271 ) -> *mut std::os::raw::c_char;
1272
1273 pub fn xls_dslx_struct_member_get_type(
1274 member: *const CDslxStructMember,
1275 ) -> *mut CDslxTypeAnnotation;
1276
1277 pub fn xls_dslx_enum_def_get_identifier(
1280 enum_def: *const CDslxEnumDef,
1281 ) -> *mut std::os::raw::c_char;
1282
1283 pub fn xls_dslx_enum_def_get_member_count(enum_def: *const CDslxEnumDef) -> i64;
1284
1285 pub fn xls_dslx_enum_def_get_member(
1286 enum_def: *const CDslxEnumDef,
1287 i: i64,
1288 ) -> *mut CDslxEnumMember;
1289
1290 pub fn xls_dslx_enum_def_get_underlying(
1291 enum_def: *const CDslxEnumDef,
1292 ) -> *mut CDslxTypeAnnotation;
1293
1294 pub fn xls_dslx_enum_member_get_name(
1295 member: *const CDslxEnumMember,
1296 ) -> *mut std::os::raw::c_char;
1297
1298 pub fn xls_dslx_enum_member_get_value(member: *const CDslxEnumMember) -> *mut CDslxExpr;
1299
1300 pub fn xls_dslx_expr_get_owner_module(expr: *mut CDslxExpr) -> *mut CDslxModule;
1301
1302 pub fn xls_dslx_interp_value_free(value: *mut CDslxInterpValue);
1305
1306 pub fn xls_dslx_interp_value_to_string(
1307 value: *mut CDslxInterpValue,
1308 ) -> *mut std::os::raw::c_char;
1309
1310 pub fn xls_dslx_parametric_env_create(
1312 items: *const XlsDslxParametricEnvItem,
1313 items_count: libc::size_t,
1314 error_out: *mut *mut std::os::raw::c_char,
1315 env_out: *mut *mut CDslxParametricEnv,
1316 ) -> bool;
1317 pub fn xls_dslx_parametric_env_free(env: *mut CDslxParametricEnv);
1318
1319 pub fn xls_dslx_interp_value_make_ubits(bit_count: i64, value: u64) -> *mut CDslxInterpValue;
1320 pub fn xls_dslx_interp_value_make_sbits(bit_count: i64, value: i64) -> *mut CDslxInterpValue;
1321 pub fn xls_dslx_interp_value_make_enum(
1322 def: *mut CDslxEnumDef,
1323 is_signed: bool,
1324 bits: *const CIrBits,
1325 error_out: *mut *mut std::os::raw::c_char,
1326 result_out: *mut *mut CDslxInterpValue,
1327 ) -> bool;
1328 pub fn xls_dslx_interp_value_make_tuple(
1329 element_count: libc::size_t,
1330 elements: *mut *mut CDslxInterpValue,
1331 error_out: *mut *mut std::os::raw::c_char,
1332 result_out: *mut *mut CDslxInterpValue,
1333 ) -> bool;
1334 pub fn xls_dslx_interp_value_make_array(
1335 element_count: libc::size_t,
1336 elements: *mut *mut CDslxInterpValue,
1337 error_out: *mut *mut std::os::raw::c_char,
1338 result_out: *mut *mut CDslxInterpValue,
1339 ) -> bool;
1340
1341 pub fn xls_dslx_interp_value_from_string(
1342 text: *const std::os::raw::c_char,
1343 dslx_stdlib_path: *const std::os::raw::c_char,
1344 error_out: *mut *mut std::os::raw::c_char,
1345 result_out: *mut *mut CDslxInterpValue,
1346 ) -> bool;
1347
1348 pub fn xls_dslx_interp_value_convert_to_ir(
1349 value: *mut CDslxInterpValue,
1350 error_out: *mut *mut std::os::raw::c_char,
1351 result_out: *mut *mut CIrValue,
1352 ) -> bool;
1353
1354 pub fn xls_dslx_type_to_string(
1355 type_: *const CDslxType,
1356 error_out: *mut *mut std::os::raw::c_char,
1357 result_out: *mut *mut std::os::raw::c_char,
1358 ) -> bool;
1359
1360 pub fn xls_dslx_function_to_string(function: *const CDslxFunction)
1362 -> *mut std::os::raw::c_char;
1363 pub fn xls_dslx_struct_def_to_string(
1364 struct_def: *const CDslxStructDef,
1365 ) -> *mut std::os::raw::c_char;
1366 pub fn xls_dslx_enum_def_to_string(enum_def: *const CDslxEnumDef) -> *mut std::os::raw::c_char;
1367 pub fn xls_dslx_type_alias_to_string(
1368 type_alias: *const CDslxTypeAlias,
1369 ) -> *mut std::os::raw::c_char;
1370 pub fn xls_dslx_constant_def_to_string(
1371 constant_def: *const CDslxConstantDef,
1372 ) -> *mut std::os::raw::c_char;
1373 pub fn xls_dslx_quickcheck_to_string(qc: *const CDslxQuickcheck) -> *mut std::os::raw::c_char;
1374
1375 pub fn xls_dslx_type_info_get_const_expr(
1376 type_info: *mut CDslxTypeInfo,
1377 expr: *mut CDslxExpr,
1378 error_out: *mut *mut std::os::raw::c_char,
1379 result_out: *mut *mut CDslxInterpValue,
1380 ) -> bool;
1381
1382 pub fn xls_dslx_type_get_total_bit_count(
1383 type_: *const CDslxType,
1384 error_out: *mut *mut std::os::raw::c_char,
1385 result_out: *mut i64,
1386 ) -> bool;
1387
1388 pub fn xls_dslx_type_is_signed_bits(
1389 type_: *const CDslxType,
1390 error_out: *mut *mut std::os::raw::c_char,
1391 result_out: *mut bool,
1392 ) -> bool;
1393
1394 pub fn xls_dslx_type_is_bits_like(
1395 type_: *const CDslxType,
1396 is_signed: *mut *mut CDslxTypeDim,
1397 size: *mut *mut CDslxTypeDim,
1398 ) -> bool;
1399
1400 pub fn xls_dslx_type_is_enum(type_: *const CDslxType) -> bool;
1401 pub fn xls_dslx_type_is_struct(type_: *const CDslxType) -> bool;
1402 pub fn xls_dslx_type_is_array(type_: *const CDslxType) -> bool;
1403
1404 pub fn xls_dslx_type_dim_is_parametric(dim: *const CDslxTypeDim) -> bool;
1405 pub fn xls_dslx_type_dim_get_as_bool(
1406 dim: *const CDslxTypeDim,
1407 error_out: *mut *mut std::os::raw::c_char,
1408 result_out: *mut bool,
1409 ) -> bool;
1410 pub fn xls_dslx_type_dim_get_as_int64(
1411 dim: *const CDslxTypeDim,
1412 error_out: *mut *mut std::os::raw::c_char,
1413 result_out: *mut i64,
1414 ) -> bool;
1415 pub fn xls_dslx_type_dim_free(dim: *mut CDslxTypeDim);
1416
1417 pub fn xls_dslx_type_get_enum_def(ty: *const CDslxType) -> *mut CDslxEnumDef;
1418
1419 pub fn xls_dslx_type_get_struct_def(ty: *const CDslxType) -> *mut CDslxStructDef;
1420
1421 pub fn xls_dslx_type_array_get_element_type(ty: *const CDslxType) -> *mut CDslxType;
1422 pub fn xls_dslx_type_array_get_size(ty: *const CDslxType) -> *mut CDslxTypeDim;
1423
1424 pub fn xls_package_create(name: *const std::os::raw::c_char) -> *mut CIrPackage;
1427 pub fn xls_package_get_bits_type(package: *mut CIrPackage, bit_count: i64) -> *mut CIrType;
1428
1429 pub fn xls_package_get_tuple_type(
1430 package: *mut CIrPackage,
1431 members: *mut *mut CIrType,
1432 member_count: i64,
1433 ) -> *mut CIrType;
1434
1435 pub fn xls_package_get_array_type(
1436 package: *mut CIrPackage,
1437 element_type: *mut CIrType,
1438 size: i64,
1439 ) -> *mut CIrType;
1440
1441 pub fn xls_package_get_token_type(package: *mut CIrPackage) -> *mut CIrType;
1442
1443 pub fn xls_function_builder_create(
1444 name: *const std::os::raw::c_char,
1445 package: *mut CIrPackage,
1446 should_verify: bool,
1447 ) -> *mut CIrFunctionBuilder;
1448 pub fn xls_function_builder_as_builder_base(
1449 builder: *mut CIrFunctionBuilder,
1450 ) -> *mut CIrBuilderBase;
1451 pub fn xls_function_builder_free(builder: *mut CIrFunctionBuilder);
1452 pub fn xls_bvalue_free(bvalue: *mut CIrBValue);
1453 pub fn xls_function_builder_add_parameter(
1454 builder: *mut CIrFunctionBuilder,
1455 name: *const std::os::raw::c_char,
1456 type_: *mut CIrType,
1457 ) -> *mut CIrBValue;
1458 pub fn xls_function_builder_build(
1459 builder: *mut CIrFunctionBuilder,
1460 error_out: *mut *mut std::os::raw::c_char,
1461 function_out: *mut *mut CIrFunction,
1462 ) -> bool;
1463 pub fn xls_function_builder_build_with_return_value(
1464 builder: *mut CIrFunctionBuilder,
1465 return_value: *mut CIrBValue,
1466 error_out: *mut *mut std::os::raw::c_char,
1467 function_out: *mut *mut CIrFunction,
1468 ) -> bool;
1469 pub fn xls_builder_base_add_and(
1470 builder: *mut CIrBuilderBase,
1471 lhs: *mut CIrBValue,
1472 rhs: *mut CIrBValue,
1473 name: *const std::os::raw::c_char,
1474 ) -> *mut CIrBValue;
1475 pub fn xls_builder_base_add_nand(
1476 builder: *mut CIrBuilderBase,
1477 lhs: *mut CIrBValue,
1478 rhs: *mut CIrBValue,
1479 name: *const std::os::raw::c_char,
1480 ) -> *mut CIrBValue;
1481 pub fn xls_builder_base_add_or(
1482 builder: *mut CIrBuilderBase,
1483 lhs: *mut CIrBValue,
1484 rhs: *mut CIrBValue,
1485 name: *const std::os::raw::c_char,
1486 ) -> *mut CIrBValue;
1487 pub fn xls_builder_base_add_xor(
1488 builder: *mut CIrBuilderBase,
1489 lhs: *mut CIrBValue,
1490 rhs: *mut CIrBValue,
1491 name: *const std::os::raw::c_char,
1492 ) -> *mut CIrBValue;
1493 pub fn xls_builder_base_add_not(
1494 builder: *mut CIrBuilderBase,
1495 value: *mut CIrBValue,
1496 name: *const std::os::raw::c_char,
1497 ) -> *mut CIrBValue;
1498 pub fn xls_builder_base_add_negate(
1499 builder: *mut CIrBuilderBase,
1500 value: *mut CIrBValue,
1501 name: *const std::os::raw::c_char,
1502 ) -> *mut CIrBValue;
1503 pub fn xls_builder_base_add_reverse(
1504 builder: *mut CIrBuilderBase,
1505 value: *mut CIrBValue,
1506 name: *const std::os::raw::c_char,
1507 ) -> *mut CIrBValue;
1508 pub fn xls_builder_base_add_or_reduce(
1509 builder: *mut CIrBuilderBase,
1510 value: *mut CIrBValue,
1511 name: *const std::os::raw::c_char,
1512 ) -> *mut CIrBValue;
1513 pub fn xls_builder_base_add_and_reduce(
1514 builder: *mut CIrBuilderBase,
1515 value: *mut CIrBValue,
1516 name: *const std::os::raw::c_char,
1517 ) -> *mut CIrBValue;
1518 pub fn xls_builder_base_add_xor_reduce(
1519 builder: *mut CIrBuilderBase,
1520 value: *mut CIrBValue,
1521 name: *const std::os::raw::c_char,
1522 ) -> *mut CIrBValue;
1523 pub fn xls_builder_base_add_literal(
1524 builder: *mut CIrBuilderBase,
1525 value: *mut CIrValue,
1526 name: *const std::os::raw::c_char,
1527 ) -> *mut CIrBValue;
1528 pub fn xls_builder_base_add_tuple(
1529 builder: *mut CIrBuilderBase,
1530 operands: *mut *mut CIrBValue,
1531 operand_count: i64,
1532 name: *const std::os::raw::c_char,
1533 ) -> *mut CIrBValue;
1534 pub fn xls_builder_base_add_tuple_index(
1535 builder: *mut CIrBuilderBase,
1536 tuple: *mut CIrBValue,
1537 index: i64,
1538 name: *const std::os::raw::c_char,
1539 ) -> *mut CIrBValue;
1540 pub fn xls_builder_base_add_array(
1541 builder: *mut CIrBuilderBase,
1542 element_type: *mut CIrType,
1543 elements: *const *mut CIrBValue,
1544 element_count: i64,
1545 name: *const std::os::raw::c_char,
1546 ) -> *mut CIrBValue;
1547 pub fn xls_builder_base_add_array_index(
1548 builder: *mut CIrBuilderBase,
1549 array: *mut CIrBValue,
1550 indices: *const *mut CIrBValue,
1551 index_count: i64,
1552 assumed_in_bounds: bool,
1553 name: *const std::os::raw::c_char,
1554 ) -> *mut CIrBValue;
1555 pub fn xls_builder_base_add_dynamic_bit_slice(
1556 builder: *mut CIrBuilderBase,
1557 value: *mut CIrBValue,
1558 start: *mut CIrBValue,
1559 width: i64,
1560 name: *const std::os::raw::c_char,
1561 ) -> *mut CIrBValue;
1562 pub fn xls_builder_base_add_bit_slice(
1563 builder: *mut CIrBuilderBase,
1564 value: *mut CIrBValue,
1565 start: i64,
1566 width: i64,
1567 name: *const std::os::raw::c_char,
1568 ) -> *mut CIrBValue;
1569 pub fn xls_builder_base_add_bit_slice_update(
1570 builder: *mut CIrBuilderBase,
1571 value: *mut CIrBValue,
1572 start: *mut CIrBValue,
1573 update: *mut CIrBValue,
1574 name: *const std::os::raw::c_char,
1575 ) -> *mut CIrBValue;
1576 pub fn xls_builder_base_add_concat(
1577 builder: *mut CIrBuilderBase,
1578 values: *const *mut CIrBValue,
1579 value_count: i64,
1580 name: *const std::os::raw::c_char,
1581 ) -> *mut CIrBValue;
1582 pub fn xls_builder_base_add_after_all(
1583 builder: *mut CIrBuilderBase,
1584 dependencies: *mut *mut CIrBValue,
1585 dependency_count: i64,
1586 name: *const std::os::raw::c_char,
1587 ) -> *mut CIrBValue;
1588 pub fn xls_builder_base_add_add(
1589 builder: *mut CIrBuilderBase,
1590 lhs: *mut CIrBValue,
1591 rhs: *mut CIrBValue,
1592 name: *const std::os::raw::c_char,
1593 ) -> *mut CIrBValue;
1594 pub fn xls_builder_base_add_sub(
1595 builder: *mut CIrBuilderBase,
1596 lhs: *mut CIrBValue,
1597 rhs: *mut CIrBValue,
1598 name: *const std::os::raw::c_char,
1599 ) -> *mut CIrBValue;
1600 pub fn xls_builder_base_add_umul(
1601 builder: *mut CIrBuilderBase,
1602 lhs: *mut CIrBValue,
1603 rhs: *mut CIrBValue,
1604 name: *const std::os::raw::c_char,
1605 ) -> *mut CIrBValue;
1606 pub fn xls_builder_base_add_smul(
1607 builder: *mut CIrBuilderBase,
1608 lhs: *mut CIrBValue,
1609 rhs: *mut CIrBValue,
1610 name: *const std::os::raw::c_char,
1611 ) -> *mut CIrBValue;
1612 pub fn xls_builder_base_add_umulp(
1613 builder: *mut CIrBuilderBase,
1614 lhs: *mut CIrBValue,
1615 rhs: *mut CIrBValue,
1616 name: *const std::os::raw::c_char,
1617 ) -> *mut CIrBValue;
1618 pub fn xls_builder_base_add_smulp(
1619 builder: *mut CIrBuilderBase,
1620 lhs: *mut CIrBValue,
1621 rhs: *mut CIrBValue,
1622 name: *const std::os::raw::c_char,
1623 ) -> *mut CIrBValue;
1624 pub fn xls_builder_base_add_udiv(
1625 builder: *mut CIrBuilderBase,
1626 lhs: *mut CIrBValue,
1627 rhs: *mut CIrBValue,
1628 name: *const std::os::raw::c_char,
1629 ) -> *mut CIrBValue;
1630 pub fn xls_builder_base_add_sdiv(
1631 builder: *mut CIrBuilderBase,
1632 lhs: *mut CIrBValue,
1633 rhs: *mut CIrBValue,
1634 name: *const std::os::raw::c_char,
1635 ) -> *mut CIrBValue;
1636 pub fn xls_builder_base_add_umod(
1637 builder: *mut CIrBuilderBase,
1638 lhs: *mut CIrBValue,
1639 rhs: *mut CIrBValue,
1640 name: *const std::os::raw::c_char,
1641 ) -> *mut CIrBValue;
1642 pub fn xls_builder_base_add_smod(
1643 builder: *mut CIrBuilderBase,
1644 lhs: *mut CIrBValue,
1645 rhs: *mut CIrBValue,
1646 name: *const std::os::raw::c_char,
1647 ) -> *mut CIrBValue;
1648 pub fn xls_builder_base_add_eq(
1649 builder: *mut CIrBuilderBase,
1650 lhs: *mut CIrBValue,
1651 rhs: *mut CIrBValue,
1652 name: *const std::os::raw::c_char,
1653 ) -> *mut CIrBValue;
1654 pub fn xls_builder_base_add_ne(
1655 builder: *mut CIrBuilderBase,
1656 lhs: *mut CIrBValue,
1657 rhs: *mut CIrBValue,
1658 name: *const std::os::raw::c_char,
1659 ) -> *mut CIrBValue;
1660
1661 pub fn xls_builder_base_add_ule(
1663 builder: *mut CIrBuilderBase,
1664 lhs: *mut CIrBValue,
1665 rhs: *mut CIrBValue,
1666 name: *const std::os::raw::c_char,
1667 ) -> *mut CIrBValue;
1668 pub fn xls_builder_base_add_ult(
1669 builder: *mut CIrBuilderBase,
1670 lhs: *mut CIrBValue,
1671 rhs: *mut CIrBValue,
1672 name: *const std::os::raw::c_char,
1673 ) -> *mut CIrBValue;
1674 pub fn xls_builder_base_add_uge(
1675 builder: *mut CIrBuilderBase,
1676 lhs: *mut CIrBValue,
1677 rhs: *mut CIrBValue,
1678 name: *const std::os::raw::c_char,
1679 ) -> *mut CIrBValue;
1680 pub fn xls_builder_base_add_ugt(
1681 builder: *mut CIrBuilderBase,
1682 lhs: *mut CIrBValue,
1683 rhs: *mut CIrBValue,
1684 name: *const std::os::raw::c_char,
1685 ) -> *mut CIrBValue;
1686 pub fn xls_builder_base_add_sle(
1687 builder: *mut CIrBuilderBase,
1688 lhs: *mut CIrBValue,
1689 rhs: *mut CIrBValue,
1690 name: *const std::os::raw::c_char,
1691 ) -> *mut CIrBValue;
1692 pub fn xls_builder_base_add_slt(
1693 builder: *mut CIrBuilderBase,
1694 lhs: *mut CIrBValue,
1695 rhs: *mut CIrBValue,
1696 name: *const std::os::raw::c_char,
1697 ) -> *mut CIrBValue;
1698 pub fn xls_builder_base_add_sgt(
1699 builder: *mut CIrBuilderBase,
1700 lhs: *mut CIrBValue,
1701 rhs: *mut CIrBValue,
1702 name: *const std::os::raw::c_char,
1703 ) -> *mut CIrBValue;
1704 pub fn xls_builder_base_add_sge(
1705 builder: *mut CIrBuilderBase,
1706 lhs: *mut CIrBValue,
1707 rhs: *mut CIrBValue,
1708 name: *const std::os::raw::c_char,
1709 ) -> *mut CIrBValue;
1710
1711 pub fn xls_builder_base_add_shra(
1712 builder: *mut CIrBuilderBase,
1713 a: *mut CIrBValue,
1714 b: *mut CIrBValue,
1715 name: *const std::os::raw::c_char,
1716 ) -> *mut CIrBValue;
1717 pub fn xls_builder_base_add_shrl(
1718 builder: *mut CIrBuilderBase,
1719 a: *mut CIrBValue,
1720 b: *mut CIrBValue,
1721 name: *const std::os::raw::c_char,
1722 ) -> *mut CIrBValue;
1723 pub fn xls_builder_base_add_shll(
1724 builder: *mut CIrBuilderBase,
1725 a: *mut CIrBValue,
1726 b: *mut CIrBValue,
1727 name: *const std::os::raw::c_char,
1728 ) -> *mut CIrBValue;
1729 pub fn xls_builder_base_add_nor(
1730 builder: *mut CIrBuilderBase,
1731 a: *mut CIrBValue,
1732 b: *mut CIrBValue,
1733 name: *const std::os::raw::c_char,
1734 ) -> *mut CIrBValue;
1735 pub fn xls_builder_base_add_clz(
1736 builder: *mut CIrBuilderBase,
1737 a: *mut CIrBValue,
1738 name: *const std::os::raw::c_char,
1739 ) -> *mut CIrBValue;
1740 pub fn xls_builder_base_add_ctz(
1741 builder: *mut CIrBuilderBase,
1742 a: *mut CIrBValue,
1743 name: *const std::os::raw::c_char,
1744 ) -> *mut CIrBValue;
1745 pub fn xls_builder_base_add_encode(
1746 builder: *mut CIrBuilderBase,
1747 a: *mut CIrBValue,
1748 name: *const std::os::raw::c_char,
1749 ) -> *mut CIrBValue;
1750
1751 pub fn xls_builder_base_add_decode(
1752 builder: *mut CIrBuilderBase,
1753 a: *mut CIrBValue,
1754 width: *mut i64,
1755 name: *const std::os::raw::c_char,
1756 ) -> *mut CIrBValue;
1757 pub fn xls_builder_base_add_select(
1758 builder: *mut CIrBuilderBase,
1759 selector: *mut CIrBValue,
1760 cases: *const *mut CIrBValue,
1761 case_count: i64,
1762 default_value: *mut CIrBValue,
1763 name: *const std::os::raw::c_char,
1764 ) -> *mut CIrBValue;
1765 pub fn xls_builder_base_add_array_concat(
1766 builder: *mut CIrBuilderBase,
1767 arrays: *const *mut CIrBValue,
1768 array_count: i64,
1769 name: *const std::os::raw::c_char,
1770 ) -> *mut CIrBValue;
1771 pub fn xls_builder_base_add_array_slice(
1772 builder: *mut CIrBuilderBase,
1773 array: *mut CIrBValue,
1774 start: *mut CIrBValue,
1775 width: i64,
1776 name: *const std::os::raw::c_char,
1777 ) -> *mut CIrBValue;
1778 pub fn xls_builder_base_add_array_update(
1779 builder: *mut CIrBuilderBase,
1780 array: *mut CIrBValue,
1781 update_value: *mut CIrBValue,
1782 indices: *const *mut CIrBValue,
1783 index_count: i64,
1784 assumed_in_bounds: bool,
1785 name: *const std::os::raw::c_char,
1786 ) -> *mut CIrBValue;
1787 pub fn xls_builder_base_add_identity(
1788 builder: *mut CIrBuilderBase,
1789 value: *mut CIrBValue,
1790 name: *const std::os::raw::c_char,
1791 ) -> *mut CIrBValue;
1792
1793 pub fn xls_builder_base_add_sign_extend(
1794 builder: *mut CIrBuilderBase,
1795 value: *mut CIrBValue,
1796 new_bit_count: i64,
1797 name: *const std::os::raw::c_char,
1798 ) -> *mut CIrBValue;
1799 pub fn xls_builder_base_add_zero_extend(
1800 builder: *mut CIrBuilderBase,
1801 value: *mut CIrBValue,
1802 new_bit_count: i64,
1803 name: *const std::os::raw::c_char,
1804 ) -> *mut CIrBValue;
1805
1806 pub fn xls_builder_base_add_one_hot(
1807 builder: *mut CIrBuilderBase,
1808 input: *mut CIrBValue,
1809 lsb_is_priority: bool,
1810 name: *const std::os::raw::c_char,
1811 ) -> *mut CIrBValue;
1812
1813 pub fn xls_builder_base_add_one_hot_select(
1814 builder: *mut CIrBuilderBase,
1815 selector: *mut CIrBValue,
1816 cases: *const *mut CIrBValue,
1817 case_count: i64,
1818 name: *const std::os::raw::c_char,
1819 ) -> *mut CIrBValue;
1820
1821 pub fn xls_builder_base_add_priority_select(
1822 builder: *mut CIrBuilderBase,
1823 selector: *mut CIrBValue,
1824 cases: *const *mut CIrBValue,
1825 case_count: i64,
1826 default_value: *mut CIrBValue,
1827 name: *const std::os::raw::c_char,
1828 ) -> *mut CIrBValue;
1829
1830 pub fn xls_builder_base_get_last_value(
1831 builder: *mut CIrBuilderBase,
1832 error_out: *mut *mut std::os::raw::c_char,
1833 value_out: *mut *mut CIrBValue,
1834 ) -> bool;
1835
1836 pub fn xls_builder_base_get_type(
1837 builder: *mut CIrBuilderBase,
1838 value: *mut CIrBValue,
1839 ) -> *mut CIrType;
1840
1841 pub fn xls_vast_verilog_module_add_always_ff(
1843 m: *mut CVastModule,
1844 sensitivity_list_elements: *mut *mut CVastExpression,
1845 sensitivity_list_count: usize,
1846 out_always_ff: *mut *mut CVastAlwaysBase,
1847 error_out: *mut *mut ::std::os::raw::c_char,
1848 ) -> bool;
1849 pub fn xls_vast_verilog_module_add_always_at(
1850 m: *mut CVastModule,
1851 sensitivity_list_elements: *mut *mut CVastExpression,
1852 sensitivity_list_count: usize,
1853 out_always_at: *mut *mut CVastAlwaysBase,
1854 error_out: *mut *mut ::std::os::raw::c_char,
1855 ) -> bool;
1856 pub fn xls_vast_verilog_module_add_always_comb(
1857 m: *mut CVastModule,
1858 out_always_comb: *mut *mut CVastAlwaysBase,
1859 error_out: *mut *mut ::std::os::raw::c_char,
1860 ) -> bool;
1861 pub fn xls_vast_verilog_module_add_reg(
1862 m: *mut CVastModule,
1863 name: *const ::std::os::raw::c_char,
1864 type_: *mut CVastDataType,
1865 out_reg_ref: *mut *mut CVastLogicRef,
1866 error_out: *mut *mut ::std::os::raw::c_char,
1867 ) -> bool;
1868 pub fn xls_vast_verilog_module_add_logic(
1869 m: *mut CVastModule,
1870 name: *const std::os::raw::c_char,
1871 type_: *mut CVastDataType,
1872 out_logic_ref: *mut *mut CVastLogicRef,
1873 error_out: *mut *mut std::os::raw::c_char,
1874 ) -> bool;
1875 pub fn xls_vast_verilog_file_make_pos_edge(
1876 f: *mut CVastFile,
1877 signal_expr: *mut CVastExpression,
1878 ) -> *mut CVastExpression;
1879 pub fn xls_vast_verilog_file_make_nonblocking_assignment(
1880 f: *mut CVastFile,
1881 lhs: *mut CVastExpression,
1882 rhs: *mut CVastExpression,
1883 ) -> *mut CVastStatement;
1884 pub fn xls_vast_verilog_file_make_blocking_assignment(
1885 f: *mut CVastFile,
1886 lhs: *mut CVastExpression,
1887 rhs: *mut CVastExpression,
1888 ) -> *mut CVastStatement;
1889
1890 pub fn xls_vast_always_base_get_statement_block(
1891 always_base: *mut CVastAlwaysBase,
1892 ) -> *mut CVastStatementBlock;
1893
1894 pub fn xls_vast_statement_block_add_nonblocking_assignment(
1895 block: *mut CVastStatementBlock,
1896 lhs: *mut CVastExpression,
1897 rhs: *mut CVastExpression,
1898 ) -> *mut CVastStatement;
1899 pub fn xls_vast_statement_block_add_blocking_assignment(
1900 block: *mut CVastStatementBlock,
1901 lhs: *mut CVastExpression,
1902 rhs: *mut CVastExpression,
1903 ) -> *mut CVastStatement;
1904
1905 pub fn xls_vast_statement_block_add_comment_text(
1906 block: *mut CVastStatementBlock,
1907 text: *const std::os::raw::c_char,
1908 ) -> *mut CVastStatement;
1909
1910 pub fn xls_vast_statement_block_add_blank_line(
1911 block: *mut CVastStatementBlock,
1912 ) -> *mut CVastStatement;
1913
1914 pub fn xls_vast_statement_block_add_inline_text(
1915 block: *mut CVastStatementBlock,
1916 text: *const std::os::raw::c_char,
1917 ) -> *mut CVastStatement;
1918
1919 pub fn xls_vast_statement_block_add_conditional(
1921 block: *mut CVastStatementBlock,
1922 cond: *mut CVastExpression,
1923 ) -> *mut CVastConditional;
1924 pub fn xls_vast_conditional_get_then_block(
1925 cond: *mut CVastConditional,
1926 ) -> *mut CVastStatementBlock;
1927 pub fn xls_vast_conditional_add_else_if(
1928 cond: *mut CVastConditional,
1929 expr_cond: *mut CVastExpression,
1930 ) -> *mut CVastStatementBlock;
1931 pub fn xls_vast_conditional_add_else(cond: *mut CVastConditional) -> *mut CVastStatementBlock;
1932
1933 pub fn xls_vast_statement_block_add_case(
1935 block: *mut CVastStatementBlock,
1936 selector: *mut CVastExpression,
1937 ) -> *mut CVastCaseStatement;
1938 pub fn xls_vast_case_statement_add_item(
1939 case_stmt: *mut CVastCaseStatement,
1940 match_expr: *mut CVastExpression,
1941 ) -> *mut CVastStatementBlock;
1942 pub fn xls_vast_case_statement_add_default(
1943 case_stmt: *mut CVastCaseStatement,
1944 ) -> *mut CVastStatementBlock;
1945
1946 pub fn xls_function_type_get_param_count(fty: *mut CIrFunctionType) -> i64;
1947
1948 pub fn xls_function_type_get_param_type(
1949 fty: *mut CIrFunctionType,
1950 index: libc::size_t,
1951 error_out: *mut *mut std::os::raw::c_char,
1952 param_type_out: *mut *mut CIrType,
1953 ) -> bool;
1954
1955 pub fn xls_function_type_get_return_type(fty: *mut CIrFunctionType) -> *mut CIrType;
1956
1957 pub fn xls_function_get_param_name(
1958 function: *mut CIrFunction,
1959 index: libc::size_t,
1960 error_out: *mut *mut std::os::raw::c_char,
1961 name_out: *mut *mut std::os::raw::c_char,
1962 ) -> bool;
1963
1964 pub fn xls_dslx_module_member_get_function(
1965 member: *const CDslxModuleMember,
1966 ) -> *mut CDslxFunction;
1967 pub fn xls_dslx_function_is_parametric(function: *const CDslxFunction) -> bool;
1968 pub fn xls_dslx_function_get_identifier(
1969 function: *const CDslxFunction,
1970 ) -> *mut std::os::raw::c_char;
1971
1972 pub fn xls_dslx_function_get_param_count(function: *const CDslxFunction) -> i64;
1973 pub fn xls_dslx_function_get_param(
1974 function: *const CDslxFunction,
1975 index: i64,
1976 ) -> *mut CDslxParam;
1977 pub fn xls_dslx_param_get_name(param: *const CDslxParam) -> *mut std::os::raw::c_char;
1978 pub fn xls_dslx_param_get_type_annotation(param: *const CDslxParam)
1979 -> *mut CDslxTypeAnnotation;
1980
1981 pub fn xls_dslx_type_info_get_requires_implicit_token(
1983 type_info: *mut CDslxTypeInfo,
1984 function: *mut CDslxFunction,
1985 error_out: *mut *mut std::os::raw::c_char,
1986 result_out: *mut bool,
1987 ) -> bool;
1988
1989 pub fn xls_dslx_module_member_get_quickcheck(
1991 member: *const CDslxModuleMember,
1992 ) -> *mut CDslxQuickcheck;
1993
1994 pub fn xls_dslx_quickcheck_get_function(qc: *const CDslxQuickcheck) -> *mut CDslxFunction;
1995
1996 pub fn xls_dslx_quickcheck_is_exhaustive(qc: *const CDslxQuickcheck) -> bool;
1999
2000 pub fn xls_dslx_quickcheck_get_count(qc: *const CDslxQuickcheck, result_out: *mut i64) -> bool;
2005}
2006
2007pub const DSLX_STDLIB_PATH: &str = env!("DSLX_STDLIB_PATH");
2008
2009pub const XLS_DSO_PATH: &str = env!("XLS_DSO_PATH");
2039
2040#[repr(C)]
2042pub struct CVastModulePort {
2043 _private: [u8; 0], }
2045
2046#[repr(C)]
2047pub struct CVastDef {
2048 _private: [u8; 0], }
2050
2051pub type VastModulePortDirection = i32;
2053
2054pub const XLS_VAST_MODULE_PORT_DIRECTION_INPUT: VastModulePortDirection = 0;
2056pub const XLS_VAST_MODULE_PORT_DIRECTION_OUTPUT: VastModulePortDirection = 1;
2057
2058extern "C" {
2059 pub fn xls_vast_verilog_module_get_ports(
2061 m: *mut CVastModule,
2062 out_count: *mut libc::size_t,
2063 ) -> *mut *mut CVastModulePort;
2064
2065 pub fn xls_vast_verilog_module_free_ports(
2066 ports: *mut *mut CVastModulePort,
2067 count: libc::size_t,
2068 );
2069
2070 pub fn xls_vast_verilog_module_port_get_direction(
2071 port: *mut CVastModulePort,
2072 ) -> VastModulePortDirection;
2073
2074 pub fn xls_vast_verilog_module_port_get_def(port: *mut CVastModulePort) -> *mut CVastDef;
2075
2076 pub fn xls_vast_def_get_name(def: *mut CVastDef) -> *mut std::os::raw::c_char;
2077
2078 pub fn xls_vast_def_get_data_type(def: *mut CVastDef) -> *mut CVastDataType;
2079}