Jump to content

saahm

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

saahm's Achievements

Member

Member (1/2)

0

Reputation

  1. Thank you very much for this additional Information. Yes, I've used sca_tdf::sca_de::sca_in/out to connect a sc_signal from a TLM module to a AMS module! Its good to know that there is a dynamic timestep feature for immediate callbacks in the TDF modules.
  2. Alright, I managed to debug it a bit better and understand what was happening. Long story short, It was an issue the the TLM side way faster than the AMS model was calculating. And the issue I had was actually the TLM waiting and thus not progressing simulation. After fixing this the other issue was the time scales being off a bit.
  3. Hi, I've built an AMS system that works fine on a testbench. Now instead of driving the input signals for my system from the testbench I got a TLM processing model that should drive the inputs and read the outputs of the AMS system. In the user guide there is the discrete-event signals seem to be the element of choice. I connect my TLM based peripherals through the sc_core::sc_signal that gets written/read within a SC_THREAD thats being run periodically. For my AMS modules I use `sca_tdf::sca_de::sca_in/out`. Interconnecting these seems to be no problem. The compiler doesnt throw me any errors or warnings regarding that and the executable seems to get to reach sc_start(). But it doesnt seem to progress the simulation time. The terminal output looks like this after I added a few print statements withtin my TLM and AMS modules: SystemC 2.3.3-Accellera --- Apr 27 2021 15:41:26 Copyright (c) 1996-2018 by all Contributors, ALL RIGHTS RESERVED SystemC AMS extensions 2.3.0-COSEDA Release date: 20200312 2138 Copyright (c) 2010-2014 by Fraunhofer-Gesellschaft IIS/EAS Copyright (c) 2015-2020 by COSEDA Technologies GmbH Licensed under the Apache License, Version 2.0 sim started Info: SystemC-AMS: 4 SystemC-AMS modules instantiated 1 SystemC-AMS views created 4 SystemC-AMS synchronization objects/solvers instantiated Info: SystemC-AMS: 1 dataflow clusters instantiated cluster 0: 4 dataflow modules/solver, contains e.g. module: src_1 4 elements in schedule list, 100 ms cluster period, ratio to lowest: 1 e.g. module: src_1 ratio to highest: 1 sample time e.g. module: src_1 1 connections to SystemC de, 1 connections from SystemC de heater @ 0.000000 = E6476D00 system @ 0.000000 = 1.000000 sink_1 @ 0 s: 0 sensor @ 0.000000 = E6476D00 ^C The "sim started" is a print after at the sc_start() in my sc_main(). The prints with "heater", "system", "sink_1" and "sensor" are within my AMS modules (they're all TDF MoC). The prints of my TLM modules are never reached. I am not quite sure if I missed out on how to properly interconnect the AMS-TLM layers with each other or if there might be another issue there that I am not aware of. Each of the models works independently as I expect it. I set all the modules to 100 ms, and the SC_THREADS run at 100 ms aswell, so synchronization shouldnt be an issue. Is there anything that needs attention when interconnecting TLM and AMS models? Thanks in advance
  4. Thank you very much again for your response and these additional links. I will take a look and think the resources will fill the gap in some of my understand around SystemC AMS. In the meantime I also managed to create a small TDF model that contains a simple discretized ODE. That gave me a good initial idea on how to approach using TDF for these purposes. I will play around with that knowledge and see where I land again 🙂
  5. Thank you for your answer, that is very elaborate and concise at the same time. Maybe I could have provided some more background on the purpose of these questions, as I planned to model some interaction between physical/electrical systems (usually represented by some ODE or system of ODEs) and some computing system (in SystemC TLM) -- maybe even a sensor abstraction layer. Being able to model some parts of the electro-physical system in System AMS and interconnect them with the TLM model. I thought through SystemC AMS I might be able to easily model the physical and electrical systems similarly to the way in Matlab/Simulink. But as I understood from your answers now, the LSF/ELN provide partial support for these ways of modeling. But being able to build approximate and optimizable versions with TDF (talking about the non-linear DE) it should be more than good enough to generate sensor inputs other than fixed curves or recorded scenarios.
  6. Thanks for your reply. This answer gives me a good idea what is possible with LSF and ELN then, everything that I can linearize I can have in such models. I might have some further questions. Is there a simulation performance hierarchy for the three modelling abstractions (TDF, LSF, ELN)? If I have some more modelling freedom in TDF, would models based on discretized non-linear differential equations be impacting the simulation performance? I see that there are plently of blocks that allow for s-Domain representations (for TDF and LSF), is the simulation performance similar on LSF and TDF for these? I hope you dont mind these further questions. Thanks
  7. Hello I started learning SystemC AMS recently, and I am getting familiar with this as it reminds me of using Matlab/Simulink (aside from having to write out my signal flow graph in code, which is fine to me). I tried playing around with LSF models for now to get more familiar. I tried to build a model representing a duffing-oscillator (https://en.wikipedia.org/wiki/Duffing_equation). Now I have trouble building the x(t)^3 term of the differential equation. As far as I understood I cannot simply apply the C++-Multiplication to sca_signal nor can I synthesize a cube (or other operations like square, squareroot, multiplying two or more signals) operation from the few available LSF blocks. Is there a template to write custom LSF blocks to expand the available operations or any other way to accomplish modeling non-linear behavior in ODEs for LSF? I have not found the *.cpp files for the predefined moc yet (only the header that define the classes). Having some more mathematical operations would expand the expressibility of LSF (or more general SystemC AMS in general) models. I appreciate any help and comments that might point me to something i have overlooked maybe. Thanks in advance
×
×
  • Create New...